Bug 217630 - [performance] Java StackTrace hyperlink detection could be improved
Summary: [performance] Java StackTrace hyperlink detection could be improved
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.3   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-03 21:48 EST by Jacek Pospychala CLA
Modified: 2008-02-07 21:43 EST (History)
1 user (show)

See Also:


Attachments
patch (7.61 KB, patch)
2008-02-04 08:23 EST, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.