WordPress.org

Forums

Crayon Syntax Highlighter
Crayon Performance Issue (5 posts)

  1. David Pi
    Member
    Posted 2 years ago #

    Hello.

    Thanks for this excelent work. I've used Crayon for a long time and can't blog without it now.
    But recently I found there's some performance issues about Crayon, which may slow down the page load. Unlike other syntax highlighter plugins, Crayon likely use more resouce.
    I use P3 (Plugin Performance Profiler) to test on my site. This is the report:

    Test 1. Crayon On, Capture "'pre' tag"
    All plugins: 0.726s, Crayon: 0.573s.
    http://i49.tinypic.com/30jrztt.png

    Test 2. Crayon On, Capture "'pre' tag"
    All plugins: 0.651s, Crayon: 0.515s.
    http://i48.tinypic.com/245edyw.jpg

    Test 3. Crayon On, DO NOT Capture "'pre' tag"
    All plugins: 0.382s, Crayon: 0.156s.
    http://i47.tinypic.com/24qn4oz.png

    Test 4. Crayon Off
    All plugins: 0.168s.
    http://i48.tinypic.com/2n6rqdj.png

    From this report, it's obviously Crayon use 3 times more resouce than all the 17 plugins I installed (especially when 'capture 'pre' tag' turned on). I think this could be a problem. Any plan to optimize it?

    Regards,
    David Pi

  2. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Yep, thanks for the performance metrics, I'll investigate this tomorrow and let you know.

  3. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    This is actually not that bad, considering just WP-Syntax here. You'll find that the other plugins are usually not doing anything complex or anything at all and are sitting idle hence their low times.

    I think 0.2 seconds is pretty good compared to 2 seconds on the same page, no? I made some small improvements however :)

    https://dl.dropbox.com/u/33811812/Crayon/support/efficiency/1.png
    https://dl.dropbox.com/u/33811812/Crayon/support/efficiency/2.png
    https://dl.dropbox.com/u/33811812/Crayon/support/efficiency/3.png

  4. Andrew Biss
    Member
    Posted 2 years ago #

    Added as a reply by mistake. Sorry!

  5. akarmenia
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks Andrew, I'll look into the path name issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Crayon Syntax Highlighter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic