Community
Participate
Working Groups
Created attachment 285440 [details] Java call stack of most memory allocations during compile Compiling a large eclipse workspace takes a lot of memory allocations (and thus GC and time). By far most of memory allocation in my case is caused by AliasManager.getComparator() which creates new instances of org.eclipse.core.runtime.Path during comparison. Since the comparison inside the Treemap is called at least log(n) times for all n resources the problem grows more then linear with the project size. I would like to contribute an improvement which would avoid memory allocation during compare at all. However it seems yet unclear (and wrong) to me why the AliasManager comparator does not use URI.compare() for comparing. There are subtile difference between URI.compare() and AliasManager: AliasManager/Path compares fully case sensitive while URI.compare treats scheme and host part case insensitive.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176070
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176081
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176081 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=d5ad7329480cb359fba42b15ed7ea0fbcbea8dfb
Created attachment 285531 [details] Screenshot of the flightrecording result Added Screenshot of the flightrecording showing many GB of Memory allocated by compare.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178253
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178253 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=ea4d64c5e642f12ef0dccc8b6e3ba06ff3e5fb1b
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176070 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=e1782ab6dce66b452345bfdda12e1db5f363121f
Thanks a lot Jörg for the fix and Alex for spending the time to help Jörg bringing this in. Jörg, do you see an improvement with the next successful I-build for your use case in real life?
I cannot test ibuilds on our real product. But i testet a cherry pick on our real product before hand. The problem was gone.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178384
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178384 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=27c1fda9151624b8c67959aab81bda83c6fd0ec0
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178468
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178468 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=2dc5397aadc69575e81b31e2750c474033399eca
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178475
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178478
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178479
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178475 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=911d5b2d66c8aa576672f5eb90f68326939efbac
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178478 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=69622983bfc3180df8f4ac5dcf953a7bba147b21
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178479 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=13293b97839b1145158efef2cb811e8d4ed4e1dc