TargetPlatformHelper.java - Performance & Readability Improvements#2060
TargetPlatformHelper.java - Performance & Readability Improvements#2060vogella merged 2 commits intoeclipse-pde:masterfrom
Conversation
|
I assume the build will fail (PDE build is currently not working), so I plan to leave this here and return to it, once PDE build are green again. |
|
|
||
| private static Map<String, String> fgCachedLocations; | ||
| private static Map<ITargetHandle, List<TargetDefinition>> fgCachedTargetDefinitionMap = new HashMap<>(); | ||
| // Use concurrent map to avoid synchronization overhead on read operations |
There was a problem hiding this comment.
comment doesn't match code
| } | ||
| } | ||
| return list.toArray(new String[list.size()]); | ||
| return Arrays.stream(models) |
There was a problem hiding this comment.
This is highly questionable, as it makes no improvement functionally, and makes debugging impossible.
f57d3be to
e4cac57
Compare
Optimized regex pattern compilation by precompiling PATTERN_PATH_COLON pattern used in stripPathInformation() method. Simplified switch expression in getTargetVersionString() and improved thread-safety in addTargetDefinitionMap() using computeIfAbsent(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
e4cac57 to
bbb9f65
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Optimizations:
improvement in hot paths
much cleaner and more maintainable
simplify logic
Impact: