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 181949 - Unusable performance in custom groovy code templates
Summary: Unusable performance in custom groovy code templates
Status: RESOLVED INCOMPLETE
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 181982 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-12 15:13 UTC by akochnev
Modified: 2012-05-06 15:28 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample code templates registered for groovy (1.56 KB, text/xml)
2010-03-12 15:14 UTC, akochnev
Details
thread dump while the custom code template is expanding (2.34 MB, application/octet-stream)
2010-03-12 15:15 UTC, akochnev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akochnev 2010-03-12 15:13:49 UTC
When I add a file with custom code templates for Groovy in the System Filesystem (in Editors/text/x-groovy/CodeTemplates/org-netbeans-modules-editor-settings-CustomCodeTemplates.xml ), the code completion/custom templates work but if the template uses variables (e.g. w/ curly braces), it takes up to 20 seconds to expand the custom code template in the editor, e.g. : 

<codetemplate abbreviation="fbr" xml:space="preserve">
        <code><![CDATA[fooBar(a1:${expression},count:${count default="0"},desc:${desc default="Explain what youre looking to find"}, description2:${desc})]]></code>
    </codetemplate>

If the code template contains only text replacement, the performance is normal, e.g. :

<codetemplate abbreviation="bbb" xml:space="preserve">
        <code><![CDATA["ccc"]]></code>
    </codetemplate>
Comment 1 akochnev 2010-03-12 15:14:23 UTC
Created attachment 95119 [details]
sample code templates registered for groovy
Comment 2 akochnev 2010-03-12 15:15:29 UTC
Created attachment 95120 [details]
thread dump while the custom code template is expanding
Comment 3 Marek Fukala 2010-03-14 08:37:39 UTC
*** Bug 181982 has been marked as a duplicate of this bug. ***
Comment 4 akochnev 2010-03-16 03:45:25 UTC
The contrib/codetemplatetools plugin seems to use the same custom templates file to store the custom templates; however, it is able to expand the same templates within normal times for groovy source code (the same templates that the groovy editor chokes on)
Comment 5 Martin Janicek 2012-04-26 09:12:25 UTC
Alex, how could I reproduce this? I'm quite not sure if I understand the problem.
Comment 6 Martin Janicek 2012-05-06 15:28:29 UTC
Closing as INCOMPLETE until some addition information will be available.