This should go to the TinyMCE module's documentation:

A common observation with the TinyMCE editor is that your site, under certain TinyMCE settings and conditions, can slow down quite dramatically. This is because TinyMCE will be pushed to your browser every time it is called. Apparently, TinyMCE will be pushed to the browser even if there is no text area that it could use, resulting in some speed problem with your site.

A very easy fix is the installation of the TinyMCE compressor AND the editing of one particular configuration switch inside tiny_mce_gzip.php:

Change
$diskCache = false; // If you enable this option gzip files will be cached on disk.
to this:
$diskCache = true; // If you enable this option gzip files will be cached on disk..

This makes TinyMCE be 1. compressed and 2. be held in your browser's local cache for a definable periode of time (which can be set in the same file).

Now you will only experience the transfer and loading of TinyMCE the first time until it resides in your browser's cache and from then it is instantly there when needed, no preloading of the editor any more, boosting the speed of page rendering in your browser tremendously!

A blog entry on this can also be found here.

Comments

boris mann’s picture

Created as a book page here: http://drupal.org/node/67217

Probably also a good addition to INSTALL.txt or elsewhere within the module itself.

gateone’s picture

Kewl! ;-) Thanks Boris.

bomarmonk’s picture

When installing compression for tiny_mce, where does this change need to be made?

To enable this compressor simply place the tiny_mce_gzip.php in the tiny_mce directory where tiny_mce.js is located and switch your scripts form:

<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

to

<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_gzip.php"></script>

pwolanin’s picture

where do you see these instructions to switch the scripts? the INSTALL.txt that comes with the 4.7 version says only:

6. To boost the performance of TinyMCE, download the "TinyMCE compressor" from:

     http://tinymce.moxiecode.com/download.php

   Place the tiny_mce_gzip.php file in 
   
     modules/tinymce/tinymce/jscripts/tiny_mce
bomarmonk’s picture

These instructions are from the install file for the tincymce compressor. It says to place the file in the directory (same as the Drupal module instructions), but also instructs that this change should be made. Maybe it isn't relevant to a Drupal installation of tinymce, but I thought there might be somewhere that Drupal needs this change as well?

bomarmonk’s picture

Anyone who has this working: can you confirm if the above change is not needed? Thanks.

pwolanin’s picture

I have been using TinyMCE with the gzip module installed, but honestly I haven't checked that it's being used!

I followed exactly the instructions in the install file- I did not change anything in page.tpl.php, etc.

Ok, yes! I just checked here's from the page source of my site:

<script type="text/javascript" src="/modules/tinymce/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php"></script>
bomarmonk’s picture

I am getting a message about compression everytime I load tinymce in Internet Explorer: "Tinymce was compressed 17%. Output cache file... modules/tinymce/tinymce/jscripts/tinymce...gz

I enableed debugging and then turned it off-- in the tiny_mce_gzip.php file. I've tried clearing my drupal cache, deleting and reinstalling the tiny_mce_gzip.php file (after turning debug off). Firefox doesn't display this message. Any advice on how to clear out this message?

scor’s picture

These instructions are from the install file for the tincymce compressor. It says to place the file in the directory (same as the Drupal module instructions), but also instructs that this change should be made. Maybe it isn't relevant to a Drupal installation of tinymce, but I thought there might be somewhere that Drupal needs this change as well?

No need to change anything else in Drupal. tinymce.module will check if tiny_mce_gzip.php exists, and in that case the compression will be used automatically. Otherwise, it's the tiny_mce.js that will be used. Check the header of html code of your page to see which file is used.

bomarmonk’s picture

Thanks. I believe that answers my question fully and I do have this working. Should some explanation be added to the documentation for the Drupal Tinymce module?

kreynen’s picture

Assigned: Unassigned » kreynen
Priority: Minor » Critical
kreynen’s picture

Status: Active » Closed (duplicate)
johnalbin’s picture

Title: Speed up your TinyMCE installation tremendously » documentation for TinyMCE compressor is lacking
Status: Closed (duplicate) » Fixed

The documentation has already been updated for compressor versions before 1.1.0

But, it will definitely need to be updated when compressor 1.1.0 compatibility is fixed. See http://drupal.org/node/110761

johnalbin’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

The INSTALL.txt docs have been updated for compressor version 1.0.9 and greater. Again see the patch at http://drupal.org/node/110761

Anonymous’s picture

Status: Fixed » Closed (fixed)