[MAGNOLIA-4567] Terrible performance with large CSS files Created: 04/Oct/12  Updated: 09/Oct/12  Resolved: 05/Oct/12

Status: Closed
Project: Magnolia
Component/s: gui
Affects Version/s: 4.5.2
Fix Version/s: 4.5.5

Type: Bug Priority: Major
Reporter: Tony McCrary Assignee: Federico Grilli
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX, Ubuntu Linux, etc


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When editing large CSS files (3k+ lines) via the templating kit section in Admin Central, we are running into an issue where typing a few letters takes an unacceptably long time.

For example, if you tried to move the caret to the last line, after the click you would have to wait nearly a minute before it would show up. Then to type a single letter, you have to wait another minute and so forth.

We've tried this in multiple browsers (Chrome stable and unstable, Firefox, Safari) and we get the same terrible performance. It happens on deployed instances, as well as local development instances.

Is there an easy way to disable codemirror and just get a regular text area?

We are using Magnolia 4.5.2.

Thanks!



 Comments   
Comment by Federico Grilli [ 04/Oct/12 ]

Hi Tony, thanks for reporting this issue. I moved it to the MAGNOLIA Jira project because MAGNOLIA_UI is only for the upcoming 5.0 version where of course the code editor control needs to be rewritten and hopefully will be more performing than the current one based on an old version of CodeMirror.

To answer your question, as stated in http://documentation.magnolia-cms.com/reference/controls.html#editCode, in order to disable code mirror and revert to a plain textarea you can just set

useCodeHighlighter = false

Hope this helps,

Federico

Comment by Tony McCrary [ 04/Oct/12 ]

I actually did see that reference section but I'm not sure how to change those values for the dialog in Admin Central->Templating Kit->Resources->Path to css files.

I assumed I would have to make some change to the Admin Central modules. Is that incorrect?

Thanks

Comment by Federico Grilli [ 05/Oct/12 ]

Hi, the path to editCode control config in this case is AdminCentral -> Configuration -> modules -> resources -> dialogs -> text -> tabText.

Comment by Federico Grilli [ 05/Oct/12 ]

Just for the records, I remember I once had a report about slowness of the editCode control with large files but it looked it was something happening randomly and hard to reproduce. For testing purposes I mostly used the jQuery.js file (~9K lines) shipping with STK and never had issues.

Comment by Tony McCrary [ 05/Oct/12 ]

Thank you, changing useCodeHighlighter worked perfectly.

Comment by Federico Grilli [ 05/Oct/12 ]

Glad it worked. I would resolve the issue stating that a workaround exists and that in 5.0 we are going to rewrite the control anyway using a more performant library (maybe again CodeMirror but a version greater than 1.x which is used now). Feel free to reopen the issue if you wish.

Generated at Mon Feb 12 03:57:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.