ThemeShaper Forums » Thematic

Performance penalty when using a framework?

(3 posts)
  • Started 2 years ago by tolmarc
  • Latest reply from Chris
  • This topic is not a support question

Tags:

  1. tolmarc
    Member

    Hi guys,
    one of the most popular tips on the wordpress themes community, is when using a free theme, is to customize it with your information. instead of "bloginfo" write down your blog name etc. that's because this information rarely changes.

    In a theme framework, like thematic and others, many of the data is achieved by functions that call the database again and again. Is there a performance penalty on this matter as compared to a non-framework based theme?

    would like to hear your experience about this.

    Posted 2 years ago #
  2. Hi,

    started some testing on my local machine.

    I created a test page that runs:

    a) 100,000 x $test = get_bloginfo('name') => 18.9021 seconds

    b) 100,000 x $test = CUSTOM_NAME => 0.1547 seconds

    c) 100,000 x $test = CUSTOM_NAME with check => 0.3223 seconds

    d) 100,000 x $test = thematic_bloginfo() => 1.2605 seconds

    Comments:

    b), c) and d) are using constants

    I'll collect some more data 'bout a possible thematic_bloginfo() plus a nice addition plus some more stuff that'll speed up Thematic.

    Anyway .. looking on the number of total queries we are really good compared to a lot of other themes.

    Chris

    Posted 2 years ago #
  3. Update:

    I found some time today and started a ... let's call it proof-of-concept .. I did some one time magic to Thematic .. the theme can now use constants instead of get_bloginfo() or bloginfo() which equals the recommendation to hardcode the information into your theme. The magic itself is done only one time (!!) right after installing your child theme.

    I haven't uploaded my current code to the repository 'til now. Currently the magic code is very basic and has no error handling at all.

    Chris

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.