Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 217630

Summary: [performance] Java StackTrace hyperlink detection could be improved
Product: z_Archived Reporter: Jacek Pospychala <jacek.pospychala>
Component: MylynAssignee: Jacek Pospychala <jacek.pospychala>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: steffen.pingel
Version: unspecified   
Target Milestone: 2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Jacek Pospychala CLA 2008-02-03 21:48:09 EST
see bug 205561.

-/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/internal/java/ui/JavaStackTraceHyperlinkDetector.java
regexp used in this class could probably be a bit simplified as described in this comment:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205561#c10



-/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/internal/java/ui/JavaStackTraceFileHyperlink.java
Type search can take a while, locking UI, so it could be implemented as a separate Job.
Similarly to how it's done in org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink
Comment 1 Jacek Pospychala CLA 2008-02-04 08:23:54 EST
Created attachment 88765 [details]
patch

feel free to apply if you think this issues are worth it. :)

changes:
1. regexp cosmetics
from: Pattern.compile("\\S*.{1}java:\\d*\\){1}"
to:   Pattern.compile("\\S*\\.java:\\d*\\)"

2. a bit longer copy of JDT JavaStackTraceHyperlink,
to move this long-running line:

Object result = OpenTypeAction.findTypeInWorkspace(typeName);

from UI thread to a Job.

I've tested patched hyperlink in some task with stack trace.
In bigger workspace (~70 projects), type search job was noticeable (few seconds)
Comment 2 Robert Elves CLA 2008-02-07 21:42:26 EST
Great! Patch applied, ip log updated.
Comment 3 Robert Elves CLA 2008-02-07 21:43:07 EST
Resolved.