Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-core-dev] [perf] org.eclipse.core.runtime.Path (computeSegments) : is cache possible ?

Hi,

hier is some background for this performance-problem: http://dev.eclipse.org/mhonarc/lists/platform-core-dev/msg01707.html (topic [perf] AbstractDataTreeNode.simplifyWithParent creates 100 mil instances during one build)

I've elimitated m2e and maven and now I have a 15min build in eclipse.

UseCase is: Build -> Clean -> Clean all projects.

The most allocations comes from  org.eclipse.core.runtime.Path.computeSegments and  org.eclipse.core.runtime.Path instance self : total 110GB (!) was allocated from org.eclipse.core.runtime.Path classes.

My quuestion is: is a cache for Path or segments or both possible ? Was this already discussed ?

A path is "/a/immutable/string":
As a quick proof of concept I've implemeted cache in org.eclipse.core.runtime.Path.computeSegments (key is String path) and for some invocation of new Path() (new method createPath(path)). The build time drops to 8 minutes with this patch = 2x faster.

Thank you for your answers


Martin

Back to the top