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 216280 - Typing lag and delays while writing code
Summary: Typing lag and delays while writing code
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-01 22:30 UTC by spye
Modified: 2012-10-26 08:30 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot as per the request. Contains the .nps and a .png file. (111.41 KB, application/x-zip-compressed)
2012-08-02 12:34 UTC, spye
Details
Messages.log (39.63 KB, application/octet-stream)
2012-08-02 13:10 UTC, spye
Details
Messages.log.1 as well. (228.54 KB, application/octet-stream)
2012-08-02 13:10 UTC, spye
Details
Screenshot of the troublesome part in AWT Event queue (143.99 KB, image/png)
2012-08-03 10:04 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description spye 2012-08-01 22:30:37 UTC
In a fresh NetBeans 7.2 installation, I am experiencing terrible typing lag issues (as in, basically unusable). Every 15 or 20 seconds, the IDE just pauses and does something (as in, "thinking"?) for a solid 4 or 5 seconds, and then continues with whatever activity I was doing.

If I start typing a line of code, I may get half of the line typed and then the editor will freeze, and I can continue typing but nothing appears on the screen. Then after 4 or 5 seconds, all of the characters I typed will appear almost instantly, but of course, since I can't see what I'm typing, I wind up with typos and have to backtrack. I can't write three short lines of code without this happening.

I have tried:
- uninstalling and reinstalling
- wiping the AppData\Roaming\NetBeans\7.2 folder
- wiping the AppData\Local\NetBeans\Cache folder
- Switching to a different JDK (was using 1.7.0_03, switched to 1.7.0_05). I had used 03 in NetBeans 7.1 without issues.
- Switching from the 64-bit to the 32-bit version.
- Switching the JDK from the 64-bit to the 32-bit version.
- Increasing the MaxPermSize setting in .conf default options
- Checking any associated Windows settings (ie, keyboard repeat rate, keyboard delay, etc). Note that this only happens in NetBeans, and only in 7.2.

I cannot duplicate this issue on OS X, but it happens repeatedly in Windows 7. I tried a secondary Windows 7 installation (in a VM), and can duplicate the issue there as well.

I would almost say that it's behaving as though it's doing garbage cleanup repeatedly, but monitoring the memory usage seems to give no indication that's happening at those intervals.
Comment 1 Petr Cyhelsky 2012-08-02 06:10:22 UTC
please attach snapshot of the problem taken via http://wiki.netbeans.org/FaqProfileMeNow and mmessages.log .
Comment 2 spye 2012-08-02 12:34:23 UTC
Created attachment 122677 [details]
Snapshot as per the request. Contains the .nps and a .png file.
Comment 3 spye 2012-08-02 12:41:36 UTC
Apparently, all the comments I added were wiped out when I went to attach a file. I'll summarize. I installed the profiler, then did the following:
- Started NetBeans fresh
- Waited for the background project scan to complete so that the data would be normalized
- Started the profiler
- Started typing a PHP comment in a PHP file
- Waited for the issue to occur twice
- Stopped the profiler.

There are clearly two moments where the stack depth flatlines. In this case, about 1.5 to 2 seconds. After a few minutes, this will take 3 or 4 seconds each time.

What I typed was as follows:
/**
 * Just typing in some comments to trigger the keyboard lag issue.
 * It will occur at some point in this process, where it will simply lock up for no known reason.
 * It just did it at the word "no" and will likely occur again one more time.
 * It just did it again at "one."
 */

The first occurrence happened just after typing "for" in line 2, but I continued typing. IDE freezes, then 2 seconds later, "no known reason." fills in. Continued typing after it appeared, and the same thing happened after typing "again" and after 2 seconds or so, "one more time." appeared.

I'll note that this occurs in all script (PHP, HTML, JS) files, but not in a plain TXT file. I have also tried:

- disabling code folding
- disabling code completion
- disabling hints
- turning off highlighting
- disabling spell checker

To no avail.
Comment 4 Tomas Hurka 2012-08-02 12:50:32 UTC
Thanks, but we are still missing messages.log file <http://wiki.netbeans.org/FaqLogMessagesFile>.
Comment 5 spye 2012-08-02 13:10:01 UTC
Created attachment 122679 [details]
Messages.log

Sorry about that... here's messages.log. There's also a .log1, so I'll add that as well.
Comment 6 spye 2012-08-02 13:10:44 UTC
Created attachment 122680 [details]
Messages.log.1 as well.

The secondary .log.1 file which appeared at the same time.
Comment 7 Tomas Hurka 2012-08-02 13:32:08 UTC
(In reply to comment #3)
> file. I'll summarize. I installed the profiler
Note that you don't need to install profiler to be able to do 'Profile Me'.
Comment 8 Petr Cyhelsky 2012-08-02 13:37:42 UTC
assigning to php/editor
Comment 9 Tomas Hurka 2012-08-02 13:40:10 UTC
Based on the provided data:
1) try to avoid using \\vmware-host\Shared Folders  - nps snapshot shows that significant time is spend in networking
2) use 64bit JDK
Comment 10 spye 2012-08-02 13:47:37 UTC
Thanks for this info. Here's some more detail though:

- I created a separate Windows 7 VM (which was not using a \\vmware-host shared folder), and the issue occurred there as well.

- In this particular installation (the one associated with this profile log), I have to use the vmware shared folders because I'm running Windows 7 on a Mac, and it must share my documents folder with OS X, as those folders are part of my user profile on my company network. The only alternative would be to edit my code locally on my Windows installation and replicate to my documents folder. However... my NetBeans 7.1.2 installation accesses the same vmware folder and has no lag or performance issues at all.

- I had tried both the 64-bit JDK and the 64-bit vsn of NetBeans and still had the same problem.


(In reply to comment #9)
> Based on the provided data:
> 1) try to avoid using \\vmware-host\Shared Folders  - nps snapshot shows that
> significant time is spend in networking
> 2) use 64bit JDK
Comment 11 Tomas Hurka 2012-08-02 14:18:02 UTC
(In reply to comment #10)
> Thanks for this info. Here's some more detail though:
> 
> - I created a separate Windows 7 VM (which was not using a \\vmware-host shared
> folder), and the issue occurred there as well.
Are you able to reproduce it on real hardware?
 
> - In this particular installation (the one associated with this profile log), I
> have to use the vmware shared folders because I'm running Windows 7 on a Mac,
> and it must share my documents folder with OS X, as those folders are part of
> my user profile on my company network. The only alternative would be to edit my
> code locally on my Windows installation and replicate to my documents folder.
Can you try it?
 
> - I had tried both the 64-bit JDK and the 64-bit vsn of NetBeans and still had
> the same problem.
64-bit JDK will not solve the network issues, but in general use 64bit JDK on 64bit systems.
Comment 12 Tomas Hurka 2012-08-02 14:21:00 UTC
(In reply to comment #6)
> Created attachment 122680 [details]
> Messages.log.1 as well.
> 
> The secondary .log.1 file which appeared at the same time.
When you attaching text files like the above ones, please use "text/plain" mine type instead of "application/octet-stream". Thanks.
Comment 13 spye 2012-08-02 14:39:46 UTC
I only have a Mac at my disposal for use, so I can't test this on a physical PC
with only Windows installed, at this time.

I have tried using a 7.2 installation that edits locally (and does not connect
to a network resource or to \\vmware-... at all) and the problem exists there
as well. Fresh installation, no carry-over configuration from previous, brand
new project folder created on local drive (all still in a VM, but not accessing
the \\vmware shared folder location) and the problem persists.

Switched back to 64-bit for everything (I merely ran that test in the 32-bit
environment, but I'd been using 64 as well), and no change.

The only consistency for each 7.2 installation is that they are all running in
a Windows 7 VM on top of OS X. But again, so was my 7.1.2 installation, and it
didn't have this.

(In reply to comment #11)
> (In reply to comment #10)
> > Thanks for this info. Here's some more detail though:
> > 
> > - I created a separate Windows 7 VM (which was not using a \\vmware-host shared
> > folder), and the issue occurred there as well.
> Are you able to reproduce it on real hardware?
> 
> > - In this particular installation (the one associated with this profile log), I
> > have to use the vmware shared folders because I'm running Windows 7 on a Mac,
> > and it must share my documents folder with OS X, as those folders are part of
> > my user profile on my company network. The only alternative would be to edit my
> > code locally on my Windows installation and replicate to my documents folder.
> Can you try it?
> 
> > - I had tried both the 64-bit JDK and the 64-bit vsn of NetBeans and still had
> > the same problem.
> 64-bit JDK will not solve the network issues, but in general use 64bit JDK on
> 64bit systems.
Comment 14 spye 2012-08-02 14:40:23 UTC
I had selected "auto detect" in both cases. I'll select text forcibly next time!

(In reply to comment #12)
> (In reply to comment #6)
> > Created attachment 122680 [details]
> > Messages.log.1 as well.
> > 
> > The secondary .log.1 file which appeared at the same time.
> When you attaching text files like the above ones, please use "text/plain" mine
> type instead of "application/octet-stream". Thanks.
Comment 15 Petr Cyhelsky 2012-08-03 08:00:40 UTC
I have been unable to reproduce this on physical W7 machine, so this really seems to be virtualW7-only issue.
Comment 16 Petr Cyhelsky 2012-08-03 10:04:00 UTC
Created attachment 122708 [details]
Screenshot of the troublesome part in AWT Event queue

Screenshot of the troublesome part in AWT Event queue
Comment 17 Ondrej Brejla 2012-09-04 11:45:50 UTC
I'm not sure if PHP is the right component for this issue if the reporter says that it happens for JS and HTML too. Probably the behavior will be the same for all CSL languages (including Groovy)?

And unforutnately I'm don't know how can I help you, since there is no PHP class in PetrC's screenshot and nothing strange from PHP point of view in attached screenshot...:/

Any suggestions? Thanks a lot!
Comment 18 Ondrej Brejla 2012-09-04 11:47:37 UTC
* attached snapshot, not screenshot ;)
Comment 19 Ondrej Brejla 2012-09-04 13:22:20 UTC
Maybe it can be connected with finding classpaths in Parsing Loop. In PHP part we just ask Index for some data in parsing thread and parsing API tries to getHostAddress as well as AWT thread does during writing in that "hinted" file (probably). Really don't know what we can do on PHP side. So after discussion with PetrC, reassigning to global editor.
Comment 20 Tomas Zezula 2012-09-18 13:51:20 UTC
In fact nothing to do with editor.
The problem is in ClassPathProvider -> URL.equals() on non local URL getting DNS canonical name.
Comment 21 Tomas Zezula 2012-10-26 08:30:45 UTC
The issue itself has 2 parts.
1st) In the snapshot from reporter - less important
2nd) On screenshot attached by Petr C. - more important

I created a new issue for the 1st one, issue #220895.

The second one fixed in jet-main 1b0f40db6fa0