WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP 2.5: Create New Post Loads Slow (6 posts)

  1. zxb2
    Member
    Posted 6 years ago #

    Create new post on my WP 2.5 powered site loads very slow - takes about 5-6 seconds to load.

    It seems the Javascript is causing something to stall - if I turn off Javascript the page loads instantaneous.

    This is my server specs:

    C2D 2.20 GHz
    2GB RAM
    PHP 5.2.5 / XCache 1.2.2
    Lighttpd 1.4.19

    When loading the page the CPU does not spike at all so like I said, this seems to be a JS issue. I can reproduce the slow loading in both IE8 (IE7 emulated) and Firefox 3.0 beta 4.

    EDIT: It's worth pointing out that Chris Johnston's WP 2.6 demo does not suffer from this problem...

    http://wp.chrisjohnston.org/wp-admin (u: admin / pass: demo)

  2. erick_paper
    Member
    Posted 6 years ago #

    For me chrisJ's "Write Post" is also slow. It's just the number of things that WP needs to download into that thing that makes it slow. Scripaculous JS library and whatnot.

  3. zxb2
    Member
    Posted 6 years ago #

    Well, I fixed the problem. It loads instant for me now.

    Here's what I did:

    By default WP generates a cache of the JavaScript here:

    /wp-content/uploads/js_cache/tinymce_*.js

    I downloaded that, renamed it to tinymce.js, then uploaded it to the /wp-includes/js/tinymce/ folder.

    Finally, I opened up wp-includes/script-loader.php and changed line 40 from:

    $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );

    to:

    $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tinymce.js', array('editor_functions'), $mce_version );

    Instant loading now in the write / edit post section. It seems that tiny_mce_config.php is not properly cached by the browser... so every time I went to write or edit a post it was basically re-downloading all of the Tiny MCE files.

  4. Andrew Ozz
    WordPress Dev
    Posted 6 years ago #

    If the file in the cache directory is a .js (/wp-content/uploads/js_cache/tinymce_*.js), that means you probably have compression enabled on the server. Check php.ini for zlib.output_compression. This is incompatible with the method used to compress TinyMCE.

    If this is off, TinyMCE plus all plugins will be compressed to about 70KB instead of 230KB, will have .gz extension and will load faster.

    Also the cache file is replaced every time the configuration or the version of TinyMCE changes which won't happen if you load it directly.

  5. zxb2
    Member
    Posted 6 years ago #

    azaozz: Thanks. That explains it then, I do have zlib.output_compression enabled.

  6. kylejo
    Member
    Posted 5 years ago #

    I tried both what azaozz and zxb2 said, but neither worked. I have the same problem that.

    I installed another blog on the same server I used, and post new works just fine, but the blog I originally started with doesn't.

Topic Closed

This topic has been closed to new replies.

About this Topic