Bug 532072 - Replace usage of String#replaceAll by #replace in ReferenceExtractor
Summary: Replace usage of String#replaceAll by #replace in ReferenceExtractor
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 4.8 M7   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2018-03-06 10:20 EST by Karsten Thoms CLA
Modified: 2018-05-08 07:46 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot: Profiler (198.98 KB, image/png)
2018-03-06 10:20 EST, Karsten Thoms CLA
no flags Details
Screenshot: Current profile (217.46 KB, image/png)
2018-05-08 07:46 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2018-03-06 10:20:22 EST
Created attachment 273011 [details]
Screenshot: Profiler

While profiling a clean build a hot spot was shown by YourKit in 
 org.eclipse.pde.api.tools.internal.builder.ReferenceExtractor.processName(String)
for its usage of String#replaceAll. replaceAll usage a regexp, but a simple char replace is sufficient here.
Comment 1 Eclipse Genie CLA 2018-03-06 10:30:51 EST
New Gerrit change created: https://git.eclipse.org/r/118801
Comment 3 Vikas Chandra CLA 2018-05-08 07:20:28 EDT
verified by code inspection
Comment 4 Vikas Chandra CLA 2018-05-08 07:21:14 EDT
Can you attach snapshot of profile post this change and % change of time difference for the same scenario?
Comment 5 Karsten Thoms CLA 2018-05-08 07:26:16 EDT
The results won't be comparable anymore. This heavily depends on the workspace and how often that is called. I will profile a clean build on my current platform workspace, and this method should not be visible as hot spot.
Comment 6 Karsten Thoms CLA 2018-05-08 07:46:36 EDT
Created attachment 273961 [details]
Screenshot: Current profile

On a clean build, String#replace is used by ReferenceExtractor and uses almost zero time.