I was working with a ChangePackage object, where I grabbed the collection of changes with:
ChangeCollection cc = cp.getChanges();
I then wanted to iterate through this collection looking at each change:
for (loop with idx)
Change ch = cc.get(idx);
// do stuff with source item
// do stuff with target item
I'm noticing via netmonitor that each call to ch.getSourceItem() and ch.getTargetItem() is triggering lots of network comms...
The first call to ch.getSourceItem() triggers the following:
Start: (rev 100) PROJ_CMD_REFRESH_ITEMS Time: 47 millis; Sent: 274 bytes; Got: 1046 bytes
Start: (rev 100) PROJ_CMD_GET_ITEM_HISTORY Time: 103 millis; Sent: 58 bytes; Got: 1103 bytes
But each call to ch.getTargetItem() triggers the following:
Start: (rev 100) PROJ_CMD_GET_FOLDER_ITEMS Time: 212 millis; Sent: 1370 bytes; Got: 12776 bytes
File.get("ModifiedTime") triggers a fetch from the server.>>
Start: (rev 100) PROJ_CMD_REFRESH_ITEMS Time: 43 millis; Sent: 274 bytes; Got: 949 bytes
So if a changepackage contains lots of files, this will equate to quite a bit of network comms.
Is there any way I can pool these source/target items together and populate their properties in one hit, to minimise traffic?
I had a look around the docs, StarTeam 2009 had something called ItemList, do I need something like that?