| Summary: | LogView sort is extremely slow especially that it uses the SimpleDateFormat | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Yasser Lulu <ylulu> | ||||
| Component: | UI | Assignee: | Janek Lasocki-Biczysko <janek.lb> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | baumanbr, janek.lb, loskutov, wassim.melhem | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | 3.4 M3 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Yasser Lulu
Quoting Wassim: perhaps we should store a long timestamp in the log entry itself, so that sorting by date becomes easier Fixed I could not understood why this bug is marked as fixed: the code: DateFormat formatter = new SimpleDateFormat(LogEntry.F_DATE_FORMAT); return formatter.format(entry.getDate()); Still exists in LogViewLabelProvider and used in both Eclipse 3.2.1 and 3.3 ?!? Please reopen this bug or fix it (fix is very simply: just store used SimpleDataFormat instance to the field of LogViewLabelProvider) ;-) We see huge Eclipse performance problems and 100% CPU load for a long time, if application generates "too much" (> 20) errors and PDE error view is opened at same time. Each time JVM stack trace is related to LogViewLabelProvider & SimpleDataFormat: - com.ibm.icu.impl.ICUResourceBundle.findResourceWithFallback(java.lang.String, com.ibm.icu.impl.ICUResourceBundle, com.ibm.icu.impl.ICUResourceBundle) @bci=12, line=1101 (Compiled frame) - com.ibm.icu.impl.ICUResourceBundle.getWithFallback(java.lang.String) @bci=7, line=652 (Compiled frame) - com.ibm.icu.impl.CalendarData.get(java.lang.String, java.lang.String, java.lang.String) @bci=53, line=95 (Compiled frame) - com.ibm.icu.impl.CalendarData.getStringArray(java.lang.String, java.lang.String, java.lang.String) @bci=4, line=114 (Compiled frame) - com.ibm.icu.text.DateFormatSymbols.initializeData(com.ibm.icu.util.ULocale, java.lang.String) @bci=13, line=791 (Compiled frame) - com.ibm.icu.text.SimpleDateFormat.<init>(java.lang.String, com.ibm.icu.util.ULocale) @bci=28, line=341 (Compiled frame) - com.ibm.icu.text.SimpleDateFormat.<init>(java.lang.String) @bci=5, line=317 (Compiled frame) - org.eclipse.jface.viewers.TreeViewer.doUpdateItem(org.eclipse.swt.widgets.Item, java.lang.Object) @bci=385, line=309 (Compiled frame) - org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run() @bci=12, line=95 (Compiled frame) - org.eclipse.core.runtime.SafeRunner.run(org.eclipse.core.runtime.ISafeRunnable) @bci=5, line=37 (Compiled frame) - org.eclipse.core.runtime.Platform.run(org.eclipse.core.runtime.ISafeRunnable) @bci=1, line=843 (Compiled frame) - org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run() @bci=16, line=465 (Compiled frame) - org.eclipse.core.runtime.SafeRunner.run(org.eclipse.core.runtime.ISafeRunnable) @bci=5, line=37 (Compiled frame) - org.eclipse.core.runtime.Platform.run(org.eclipse.core.runtime.ISafeRunnable) @bci=1, line=843 (Compiled frame) - org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(org.eclipse.swt.widgets.Widget, java.lang.Object, boolean) @bci=5, line=1651 (Compiled frame) - org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(org.eclipse.swt.widgets.Widget, java.lang.Object, boolean) @bci=58, line=955 (Compiled frame) - org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(org.eclipse.swt.widgets.Widget, java.lang.Object, boolean, boolean) @bci=65, line=1627 (Compiled frame) - org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(java.lang.Object, boolean) @bci=44, line=1582 (Interpreted frame) - org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(java.lang.Object) @bci=3, line=1568 (Interpreted frame) - org.eclipse.jface.viewers.StructuredViewer$7.run() @bci=8, line=1388 (Interpreted frame) - org.eclipse.jface.viewers.StructuredViewer.preservingSelection(java.lang.Runnable) @bci=18, line=1323 (Interpreted frame) - org.eclipse.jface.viewers.StructuredViewer.refresh(java.lang.Object) @bci=10, line=1386 (Interpreted frame) - org.eclipse.jface.viewers.StructuredViewer.refresh() @bci=5, line=1345 (Interpreted frame) - org.eclipse.pde.internal.runtime.logview.LogView$20.run() @bci=20, line=670 (Interpreted frame) - org.eclipse.swt.widgets.RunnableLock.run() @bci=11, line=35 (Compiled frame) - org.eclipse.swt.widgets.Display.runAsyncMessages(boolean) @bci=5, line=3143 (Compiled frame) - org.eclipse.ui.internal.Workbench.runEventLoop(org.eclipse.jface.window.Window$IExceptionHandler, org.eclipse.swt.widgets.Display) @bci=9, line=1914 (Compiled frame) - org.eclipse.ui.internal.Workbench.runUI() @bci=225, line=1878 (Interpreted frame) The bug was marked as fixed because we reduced the amount of SimpleDateFormats we instantiated. We fixed the code in the comparator which was the original bug. Your request makes sense. So I am going to reopen the bug so we can see what we can do to further enhance performance. Chris, since you already did the refactoring work for the Log View, I didn't want to drop too much code before you get a chance to commit it. So can you take a look at this bug when you are finishing off the refactoring? targetting towards M3 Sorry to jump in so late, but I saw this in my inbox this morning and started working on it. Its almost done - if you guys haven't done the work yourselves yet let me know and I'll commit my changes shortly. If you are almost done, I sure am not going to stop you :) Do me a favor and post a patch in addition to committing your changes. I can see if I can include the changes in the refactoring patch Chris has so we can include this fix when we move the Log View. Created attachment 79486 [details]
LogEntrys will now store a formatted date string, in addtion to a Date object, for faster label providing
Alright, the new code has been tested/applied (and the performance is better) See the patch above - thanks for letting me squeeze this one in - it was my fault for missing it in the 1st place. Thanks Janek for taking care of this bug. We appreciate it :) I went ahead and included it in the patch Chris had for refactoring the Error Log View into a separate plug-in, so we would not lose this fix. Marking as fix since it is in HEAD and in Chris's refactoring patch. |