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 194222 - LowPerformance took 20992 ms.
Summary: LowPerformance took 20992 ms.
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Smarty (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords: PERFORMANCE
: 195279 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-11 13:56 UTC by claudsan
Modified: 2011-09-06 10:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 174929


Attachments
nps snapshot (35.05 KB, application/nps)
2011-01-11 13:56 UTC, claudsan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description claudsan 2011-01-11 13:56:32 UTC
Build: NetBeans IDE 7.0 Beta (Build 201011152355)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07
OS: Windows 7

User Comments:
claudsan: 1 - Open project
2 - Open File in Project



Maximum slowness yet reported was 20992 ms, average is 12503
Comment 1 claudsan 2011-01-11 13:56:37 UTC
Created attachment 104882 [details]
nps snapshot
Comment 2 Marek Fukala 2011-01-12 12:43:38 UTC
contrib/php.smarty issue

indenter locked by document's lock obtained during lexing called from parsing thread. The lexing is unbearably long.

Martine, you cannot do this (TplTopLexer):

 private boolean isSmartyOpenDelimiter(CharSequence text) {
            return (text.toString().endsWith(metadata.getOpenDelimiter()));
        }

text.toString() clones the whole lexer's cached underlying source.

Apparently the input may become pretty long.

Use CharsequenceUtilities.endsWith(x,y);
Comment 3 Martin Fousek 2011-01-14 15:54:15 UTC
Thank you Marek for your valuable advice. 
Implemented in http://hg.netbeans.org/main/contrib/rev/e1387a5d34c8.

claudsan could you try it again in next dev build? BTW you have to install update to newer Smarty plugin version - 1.38. Please let us know if it helped, thanks...
Comment 4 Martin Fousek 2011-08-25 12:50:47 UTC
*** Bug 195279 has been marked as a duplicate of this bug. ***
Comment 5 Quality Engineering 2011-08-27 14:12:32 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/324e309fbee9
User: Martin Fousek <marfous@netbeans.org>
Log: #194222 - CharSequence.toString.endsWith replaced by CharSequenceUtilities.endsWith