Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340352 - [performance] [scalability] copying local artifacts has an unnecessary overhead of 0.1s
Summary: [performance] [scalability] copying local artifacts has an unnecessary overhe...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 13:33 EDT by Helmut J. Haigermoser CLA
Modified: 2011-05-06 03:08 EDT (History)
2 users (show)

See Also:


Attachments
Proposed change to get performance up (4.08 KB, patch)
2011-03-18 11:04 EDT, Helmut J. Haigermoser CLA
pascal: iplog+
pascal: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut J. Haigermoser CLA 2011-03-17 13:33:53 EDT
Build Identifier: 3.6

When mirroring artifacts locally from/to a SimpleArtiRepo the private "downloadArtifact" method has a minimum run time of 0.1 seconds(on my host), even for very small artifacts with a few bytes to copy. 

Replacing the "getTransport().download()" call with "FileUtils.copyStream()" speeds that up tremendously, which is why I suggest changing downloadArtifact to do that for "scheme == file" downloads...

The transport accepts a monitor so copyStream might need that too so that the UI can report proper progress on the copy stage...

Reproducible: Always

Steps to Reproduce:
1. Mirror artifacts from a file: URI
2. Check performance of copying each artifact
3. Notice that even very small artifacts seem to have a "copy overhead" of 100+ milli seconds
Comment 1 Pascal Rapicault CLA 2011-03-17 16:27:41 EDT
Could you please provide a patch?
Comment 2 Helmut J. Haigermoser CLA 2011-03-18 11:04:57 EDT
Created attachment 191516 [details]
Proposed change to get performance up

Hi Pascal :)
This is the proposed change, it's very small, a few lines really,
but I also tried to create a copy method accepting a progress monitor, not so sure about that one though, reporting every 16k will be a lot of monitor notifications for a bigger file..
HTH,
Helmut
Comment 3 Ian Bull CLA 2011-04-21 13:32:36 EDT
Pascal, do you want to apply this, or push it out to 3.8?
Comment 4 Pascal Rapicault CLA 2011-05-05 16:42:57 EDT
I've released the patch. It makes quite a difference !!! Thx for this.
Comment 5 Helmut J. Haigermoser CLA 2011-05-06 03:08:09 EDT
(In reply to comment #4)
> I've released the patch. It makes quite a difference !!! Thx for this.

Thanks for picking this up, I'm glad it helps! :)
Helmut