[wp-trac] [WordPress Trac] #5807: New gzip compressor for TinyMCE
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 9 22:18:56 GMT 2008
#5807: New gzip compressor for TinyMCE
-------------------------+--------------------------------------------------
Reporter: azaozz | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5
Component: TinyMCE | Version:
Severity: normal | Keywords: 2nd-opinion has-patch
-------------------------+--------------------------------------------------
The default gzip compressor for TinyMCE works good, but half of what it
does seems pointless.
- It starts with the server generating some js with php (the init array),
then sends it to the browser.
- The browser runs it through couple of js functions, and sends most of it
back to the server as a GET request.
- The server then uses the GET vars (that are exactly the same it
generated in step 1), gathers the different pieces of TMCE, compresses
them and sends them back to the browser.
I don't see the point of sending the init array back and forth, as all the
settings the compressor needs to gather TMCE's pieces are available in the
beginning. I've put together a script that does all in one step (merged
tiny_mce_config and tiny_mce_gzip). It's a bit faster, a bit more reliable
(eliminates possible errors in the first two steps), and will eliminate
some of the problems with TMCE when the browser uses cached copy of the
init array.
To implement this in WordPress we will have to change two actions into
filters. This will break a few plugins, so I've made compatibility
function that capture the output (the actions are outputting js) and
insert it into the gzipped file.
It also includes new filter for adding external plugins to TinyMCE and has
option to save the gzipped file to disk for faster processing.
--
Ticket URL: <http://trac.wordpress.org/ticket/5807>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list