This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 131503 - 100% cpu caused by tooltip
Summary: 100% cpu caused by tooltip
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-03-29 01:46 UTC by keeskuip
Modified: 2008-04-09 14:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread-dump (32.54 KB, text/plain)
2008-03-29 10:42 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keeskuip 2008-03-29 01:46:36 UTC
I get 100% cpu for a very long time when I hover the mousepointer above a variable which is a very large hashmap.
The system is trying to create a tooltip from that variable. Because the hashmap is very large it takes a very, very
long time before something happens. When it happens it is best to kill netbeans right away.

There should be some limit on the size of the string that is shown with a tooltip.
Comment 1 Marian Mirilovic 2008-03-29 10:42:16 UTC
Agreed, very annoying and IDE is really unusable. See attached thread-dump ...
Comment 2 Marian Mirilovic 2008-03-29 10:42:43 UTC
Created attachment 59340 [details]
thread-dump
Comment 3 Martin Entlicher 2008-03-31 00:12:05 UTC
This is mainly a swing problem, JTextArea is not able to compute it's preferred size!

We can limit the length of String provided for tooltip, it will prevent from transfer of large amount of data from the
debugee.
Comment 4 Martin Entlicher 2008-03-31 01:33:51 UTC
We truncate the string for tooltip:
changeset:   76767:49a96a93cb8e
http://hg.netbeans.org/main/rev/49a96a93cb8e
Comment 5 pribyl 2008-04-09 14:38:58 UTC
Verified.

Tested on NB 6.1 RC build 200804082140

As the tooltip String length is limited, there is almost no impact on performance.