Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316916

Summary: [repository] loading children of a composite repo is not covered by progress monitors
Product: [Eclipse Project] Equinox Reporter: Helmut J. Haigermoser <helmut.haigermoser>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: irbull, pascal, susan
Version: unspecified   
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
propsed patch to get progress from loading the children
dj.houghton: iplog+
updated patch none

Description Helmut J. Haigermoser CLA 2010-06-15 10:43:12 EDT
Build Identifier: helios

When loading a composite repo the load method is given a progress monitor to report back on progress made. However, the children have to be loaded as well, one by one, and this happens in uncovered "addChild" and "load" calls. These calls however take most of the time, 10 children will require 10 times the time to download the file locally and load it into memory, all time that is not reported in detail to the progress monitor.

I propose reporting progress on loading children as well, thus creating a more accurate progress information

Reproducible: Always

Steps to Reproduce:
1. load composite repo
2. check the monitor messages
Comment 1 Pascal Rapicault CLA 2010-06-21 22:45:52 EDT
Patch welcome.
Comment 2 Helmut J. Haigermoser CLA 2010-06-22 09:04:44 EDT
Created attachment 172410 [details]
propsed patch to get progress from loading the children

Hi Pascal :)
Let me know what you think, this first version informs the progress monitor about the loading of children...
Helmut
Comment 3 Susan McCourt CLA 2010-08-05 12:46:15 EDT
*** Bug 311585 has been marked as a duplicate of this bug. ***
Comment 4 DJ Houghton CLA 2011-02-04 15:32:10 EST
Created attachment 188365 [details]
updated patch

I applied the patch and then ran Susan's scenario in the dup'd bug (perform a Reload in the Prefs page) but the progress still wasn't quite right. But after some digging, I found the culprit. In AbstractRepositoryManager#loadRepository the monitor was being passed to the transport to load an index file, but we weren't creating a child first. I've fixed that and released your patch as well. Thanks for the patch.
Comment 5 DJ Houghton CLA 2011-02-04 15:32:43 EST
Closing.
Comment 6 Helmut J. Haigermoser CLA 2011-02-07 02:53:13 EST
(In reply to comment #4)
> Created attachment 188365 [details]
> updated patch
> 
> I applied the patch and then ran Susan's scenario in the dup'd bug (perform a
> Reload in the Prefs page) but the progress still wasn't quite right. But after
> some digging, I found the culprit. In AbstractRepositoryManager#loadRepository
> the monitor was being passed to the transport to load an index file, but we
> weren't creating a child first. I've fixed that and released your patch as
> well. Thanks for the patch.

Thanks DJ, that's great! :)
Helmut
Comment 7 Susan McCourt CLA 2011-02-07 12:42:13 EST
thanks, DJ!  That has bugged me for a long time!