Skip to main content

 

MindTouch Success Center

Optimize editor performance

Written by Theresa Manzo
Product Manager at MindTouch
This page applies to:MindTouch (current)

If you have articles with a large number (100+) of widgets (comments, paths, etc) or hundreds of words that trigger the spell checker in long blocks of text, configure the MindTouch editor to improve your performance while editing those pages. 
 

It is recommended that you set a character limit to trigger autosave and spellcheck as you type (SCAYT) optimizations; the default autosave and SCAYT configurations are optimized for normal circumstances.

 

Optimize editor performance for large pages


Using the editor configurations below trigger the optimization of the autosave and SCAYT settings on larger pages. Each of these settings is modifiable based on the needs of your particular MindTouch site.


performanceTweaksEnabled_minLength
Changing this configuration value applies to any page that exceeds the 50,000 character limit. The character count is based on the HTML-generated for that content. The count is viewable by using the menu option View > Source. The default value is set to infinity.

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
}

You may also turn these optimization settings on without setting a character limit by using the below configuration. 

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled = true;
};

 

Autosave settings

Implement these configuration keys alongside the character limit to trigger autosave optimizations. The following examples explain what each of these settings are for. See the Examples section below for implementation details.
 

autosave_interval
By default, the editor automatically saves your content changes every 25 seconds. Increasing this interval to every 50 seconds reduces the number of times changes are saved to your local storage.

CKEDITOR.editorConfig = function( config ) {
    config.autosave_interval = 50;
}

autosave_minLength
In addition to automatically saving changes over a period of time, the editor also saves to your local storage every time you change 120 characters or more.

CKEDITOR.editorConfig = function( config ) {
    config.autosave_minLength = 120;
}

 

SCAYT (spell check as you type) settings

Implement these configuration keys alongside the character limit to trigger SCAYT optimizations. The following examples explain what each of these settings are for. See the Examples section below for implementation details.
 

scayt_findWordDelay
Use this configuration to increase the time between highlighting each misspelled word, lowering the amount of processes occurring while your editor is open.

CKEDITOR.editorConfig = function( config ){
    config.scayt_findWordDelay = 1500;
}

scayt_handleCheckDirty
Setting this function to false provides better performance on big preloaded text. However, disabling it may affect your autosave functionality.

CKEDITOR.editorConfig = function( config ){
    config.scayt_handleCheckDirty = false;
}

scayt_handleUndoRedo
Setting this configuration to false provides better performance on text undo/redo actions by using the native functionality of the editor instead of the SCAYT plugin.

CKEDITOR.editorConfig = function( config ){
    config.scayt_handleUndoRedo = false;
}

 

Examples


The user has the ability to modify these keys to however they see fit. Below are some examples that can be used to improve the user's experience. 
 

Triggering configurations by setting a character length:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
};


Triggering the configuration and overriding one of the settings:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled_minLength = 50000;
    config.performanceTweaks.scayt_handleCheckDirty = true;
}


Triggering configurations without setting a minimum character length:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled = true;
};


Triggering configurations without setting a minimum character length and overriding one of the settings:

CKEDITOR.editorConfig = function( config ) {
    config.performanceTweaksEnabled = true;
    config.performanceTweaks.autosave_interval = 100;
};
  • Was this article helpful?