Bug 268988 - Investigate removing the use of file handles in the API framework
Summary: Investigate removing the use of file handles in the API framework
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 233643
  Show dependency tree
 
Reported: 2009-03-17 10:44 EDT by Michael Rennie CLA
Modified: 2009-04-28 14:20 EDT (History)
1 user (show)

See Also:
Olivier_Thomann: review+


Attachments
fix (8.33 KB, patch)
2009-04-07 14:45 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2009-03-17 10:44:23 EDT
Currently in our API baselines and (some) type containers we hold onto file handles and open streams, which is what requires us to open / close baselines (both the workspace and default) during a build. In the full build world this is not so bad / noticeable, but in the incremental world this adds a significant percentage of time to the build (from my testing 24 - 48ms of time in a ~900 ms operation). 

For the sake of not doing this extra work in the builds and to prevent leaking file handles / stream we should remove the use of file handles in favour of something else, URIs perhaps?
Comment 1 Michael Rennie CLA 2009-04-07 14:45:38 EDT
Created attachment 131157 [details]
fix

This patch removes the last vestiges of holding on to File handles in our framework. The only remaining place that we hold on to file system handles is in our bundle API component(s) - an open zip handle. The reason for this is that it is more costly to open / close the archive each time we want to find a type to compare than it is to hold it open until the end of the build.
Comment 2 Michael Rennie CLA 2009-04-07 15:41:58 EDT
applied patch, please verify Olivier
Comment 3 Olivier Thomann CLA 2009-04-28 14:20:48 EDT
Verified.