Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 422860

Summary: //** such markdown in .js file comments slows or even hangs orion editor completely **
Product: [ECD] Orion Reporter: Adrian Aichner <adrian.aichner>
Component: EditorAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: unspecified   
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Slows orion editor, can be expanded to hang it for good. none

Description Adrian Aichner CLA 2013-11-29 10:45:28 EST
Created attachment 237862 [details]
Slows orion editor, can be expanded to hang it for good.

I originally saw the problem with
https://github.com/anaran/devtools-snippets/blob/e0ebe3182f7c4558c706312af9725337e05fecc4/snippets/devtools_import_export/devtools_import_export.js
where it aver came back.

I have attached a manageable test case for your convenience.

Adrian
Comment 1 Mark Macdonald CLA 2013-11-29 11:58:21 EST
Hi Adrian, do you have the 'nonnlsPlugin' installed, by any chance? It has a bug which causes extreme performance degradation on certain input files, even when you have turned off "Validation > Warn on unexternalized strings".

Coincidentally, I just hit this bug yesterday and I've got a fix ready.
Comment 2 Mark Macdonald CLA 2013-11-29 12:01:07 EST
Fixed in master. 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=26f2a18

For anyone who hasn't picked up the fix yet: a simple workaround is to disable or uninstall the nonnlsPlugin under Settings > Plugins.
Comment 3 Adrian Aichner CLA 2013-11-29 12:32:03 EST
I do have nonnlsPlugin installed and disabling it does fix the problem as a workaround.

Interestingly I even have to close the Chrome New Tab (Ctrl+T) from which I opened my orion editor because that tab also bogs down the client PC cpu even after I close all orion tabs.
Comment 4 Adrian Aichner CLA 2013-11-29 12:46:49 EST
I pulled master (client and server), reloaded nonnls and can happily report the problem with the editor fixed for my big test case.

Running the String Xtrnlzr in the directory with that file (only has one .md file and 17 png files alongside it) still hangs the orion tabs.

But the bug I reported is fixed. Great!
Comment 5 Mark Macdonald CLA 2013-11-29 12:57:05 EST
> Running the String Xtrnlzr in the directory with that file (only has one .md file and 17 png files alongside it) still hangs the orion tabs.

Hmm. I checked the Xtrnlzr code and it's using a copy of the same problematic regex that hung the nls plugin. Reopening -- I will fix that as well.
Comment 6 Mark Macdonald CLA 2013-11-29 13:19:52 EST
This should fix the externalizer as well:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=9583309
Comment 7 Adrian Aichner CLA 2013-11-29 13:47:51 EST
Yep, that is fixed too!
I like it you got rid of the code duplication!