Bug 461851 - [publisher][performance] Only compute MD5 for artifact descriptors which need to be added
Summary: [publisher][performance] Only compute MD5 for artifact descriptors which need...
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 437896
  Show dependency tree
 
Reported: 2015-03-10 12:03 EDT by Tobias Oberlies CLA
Modified: 2018-03-16 14:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Oberlies CLA 2015-03-10 12:03:58 EDT
To add the IArtifactDescriptor entry for the bundle to be published, BundlesAction calls AbstractPublisherAction.publishArtifact. This method returns quickly if the artifact descriptor already exists in the target repository. So far so good.

However before checking if there is already a descriptor in the artifact repository, the BundlesAction creates the descriptor with PublisherHelper.createArtifactDescriptor and this includes the computation of the MD5. The BundlesAction (or better all publishers) should avoid this relatively expensive file system operation when possible.

A solution for this issue could be to move the MD5 computation to AbstractPublisherAction.publishArtifact, where it can be decided whether the descriptor is actually needed or will be discarded anyway.