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 183380

Summary: [69cat][ruby] Source Reformatting starved for resources by Project Scanning
Product: editor Reporter: esmithbss <esmithbss>
Component: Parsing & IndexingAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: emononen, tzezula
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 182653    
Bug Blocks:    

Description esmithbss 2010-04-02 08:05:44 UTC
Product Version = NetBeans IDE Dev (Build 201003290201)
Operating System = Linux version 2.6.32-18-generic running on i386
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) Client VM 16.2-b04

When the Projects are being scanned (in this case 1 project), the source code formatter for an html.erb file is starved for CPU resources resulting in a 20+ second time to format a 58 line file.

Steps to Reproduce:

1) Close any existing projects
2) use git to pull down git://github.com/alloy/complex-form-examples.git
3) Create a new project in the IDE for a Ruby on Rails application with existing sources.  Use the Complex-Form-Examples project.
4) While Project scanning in progress, open Views/projects/_form.html.erb
5) Click on Source->Format in the menu.
Comment 1 Erno Mononen 2010-04-02 11:34:34 UTC
The formatter is probably waiting to get the parser lock for parsing the file, while the parsing (scanning) thread holds the lock until the initial scanning is done. Not sure now what can be done about this.
Comment 2 Erno Mononen 2010-04-06 08:34:43 UTC
Reassigning to Parsing API after discussing this with tzezula.
Comment 3 Tomas Zezula 2010-04-06 18:16:35 UTC
There is no way how to solve it in the prasing.api in the NB 6.9.
The only possibility is to allow editor features during scan => transactional index. Right now you can either show a dialog that the scan is active and allow user to cancel it.
Comment 4 Tomas Zezula 2012-01-26 12:44:19 UTC
Fixed jet-main 41985eb45913