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 246421 - org.openide.awt.ContextManager.isEnabledOnDataImpl: LowPerformance took 20237 ms.
Summary: org.openide.awt.ContextManager.isEnabledOnDataImpl: LowPerformance took 20237...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P2 normal with 3 votes (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: PERFORMANCE
: 246627 250458 250486 (view as bug list)
Depends on: 223192 250349
Blocks:
  Show dependency tree
 
Reported: 2014-08-13 04:29 UTC by wanmifam
Modified: 2015-07-21 14:46 UTC (History)
31 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 211213


Attachments
nps snapshot (336.14 KB, application/nps)
2014-08-13 04:29 UTC, wanmifam
Details
Thread dump using jstack (42.73 KB, text/plain)
2015-05-13 15:58 UTC, qte
Details
JMap histogram (747.71 KB, text/plain)
2015-05-13 16:02 UTC, qte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wanmifam 2014-08-13 04:29:05 UTC
This bug was originally marked as duplicate of bug 242126, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201408120001)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.55-b03, Java(TM) SE Runtime Environment, 1.7.0_55-b13
OS: Mac OS X

User Comments:
wanmifam: It lock the windows.



Maximum slowness yet reported was 20237 ms, average is 20237
Comment 1 wanmifam 2014-08-13 04:29:11 UTC
Created attachment 148667 [details]
nps snapshot
Comment 2 Stanislav Aubrecht 2014-08-13 07:55:24 UTC
Some ProxyLookup methods take several seconds to finish, please evaluate, thanks.
Comment 3 Milos Kleint 2014-08-19 03:59:20 UTC
keeps on happening for me with 8.0 on macosx. I have to restart the IDE then and it works again for a few hours. Once the 20+ second delays start appearing, there's no other cure.


Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2
Java: 1.7.0_60; Java HotSpot(TM) 64-Bit Server VM 24.60-b09
Runtime: Java(TM) SE Runtime Environment 1.7.0_60-b19
System: Mac OS X version 10.9.4 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/mkleint/Library/Application Support/NetBeans/8.0
Cache directory: /Users/mkleint/Library/Caches/NetBeans/8.0
Comment 4 Jaroslav Tulach 2014-08-21 12:30:55 UTC
If you looked at the invocation counts you would find out that while there is 28 invocations of

org.openide.awt.ContextManager.isEnabled()

there is then more than 700 of calls to

org.openide.util.lookup.SimpleProxyLookup$ProxyResult.allItems()

so I doubt the problem is in lookup. Just somebody calls into the lookup like crazy. 

There is a logging mechanism (since bug 223192) that should print the names of actions that are being re-computed. However it is only turned on when the IDE is executed with -ea as most of the reports is from 8.0, I am afraid we won't find the list. Anyone can simulate the problem with -ea on?
Comment 5 Ondrej Vrabec 2014-08-21 12:52:07 UTC
probably a dup of bug 242126
Comment 6 Ondrej Vrabec 2015-03-06 12:56:04 UTC
*** Bug 246627 has been marked as a duplicate of this bug. ***
Comment 7 Ondrej Vrabec 2015-03-06 13:15:03 UTC
apparently bug #242126 has not been fixed and the problem is elsewhere.
Comment 8 Ondrej Vrabec 2015-03-06 16:24:56 UTC
very likely caused by toooo many listeners being notified, see #250349
Comment 9 Ondrej Vrabec 2015-03-07 07:44:45 UTC
*** Bug 250458 has been marked as a duplicate of this bug. ***
Comment 10 Ondrej Vrabec 2015-03-20 10:05:06 UTC
*** Bug 250486 has been marked as a duplicate of this bug. ***
Comment 11 Milos Kleint 2015-04-29 00:22:03 UTC
this issue is THE reason why I have to restart the IDE DAILY, sometimes multiple times! 
Is there anything I can do to help you track the problem?

I'm using exclusively maven projects on git.
Comment 12 qte 2015-05-10 15:20:00 UTC
How can we/I help get enough information for this bug to be fixed?
I have tried enabling -ea in my startup script as per Jaroslav Tulach's comment but no additional information related to this error appear.
Comment 13 Ondrej Vrabec 2015-05-10 16:40:21 UTC
(In reply to qte from comment #12)
> How can we/I help get enough information for this bug to be fixed?
> I have tried enabling -ea in my startup script as per Jaroslav Tulach's
> comment but no additional information related to this error appear.

When this happens please generate a heap dump, i think it's caused by #250349 - an OutOfMemoryError.
Comment 14 qte 2015-05-13 15:58:31 UTC
Created attachment 153635 [details]
Thread dump using jstack
Comment 15 qte 2015-05-13 16:02:48 UTC
Created attachment 153636 [details]
JMap histogram

I have added both a memory histogram created using:
map -histo:live <pid>

And a thread dump created using
jstack <pid>

I can upload a full heap dump if required.
Comment 16 Ondrej Vrabec 2015-07-13 09:43:58 UTC
iterating over thousands of items in ProxyLookup.setLookups
Comment 17 Jaroslav Havlin 2015-07-21 14:45:48 UTC
Marking as fixed for now.
See bug 250349 comment 13, which also applies to this issue.

Thank you for reporting.