Announcement

Collapse
No announcement yet.

server ressources for conditionals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • server ressources for conditionals

    I put the following conditions in my header template (among a couple of others):

    PHP Code:
    <if condition="THIS_SCRIPT == 'adv_index'">
     
    Text 1
    <else />
     <if 
    condition="in_array($forumid, array(6))">
     
    Text 2
     
    <else />
      <if 
    condition="in_array($forumid, array(60))">
       
    Text 3
      
    <else />
       <if 
    condition="PHOTOPLOG_THIS_SCRIPT == 'index'">
        
       <else />
        
    Text 4
       
    </if>
      </if>
     </if>
    </if> 
    How much is this going to affect the server resources and the time for the page to load?

  • #2
    Template conditionals don't add any aditional load onto your server
    What's My Pagerank | Piano Chords Chart | Audio Tutorials | Composer Forum | Admin Templates | IPB Skins | Button Generator

    Comment


    • #3
      I know that the templates are cached.
      But before they get cached, they need to be compiled. And there is so much dynamic information that changes frequently...

      I want to ask this again:
      I switched over to a new forum style recently and I wonder if it could have an impact on the performance?

      As a single individual, I don't notice the change. But if I activate the style for all members as the default style, could it have an impact on the performance?

      Comment


      • #4
        Originally posted by flashgordon View Post
        I know that the templates are cached.
        But before they get cached, they need to be compiled. And there is so much dynamic information that changes frequently...

        I want to ask this again:
        I switched over to a new forum style recently and I wonder if it could have an impact on the performance?

        As a single individual, I don't notice the change. But if I activate the style for all members as the default style, could it have an impact on the performance?
        It all depends on how image-heavy your style is. If all you did was change colors, there are no changes to your performance. On the other hand, if your style IS image-heavy then expect your bandwidth to go up very fast.

        In summary, the more image-heavy your style is, the higher load there is to your server because it takes more time for a user to load the style completely. However, if you have a good webhost/dedicated server, there should be no significant drops in your speeds.

        Comment


        • #5
          So it doesn't matter at all how many conditions I have in the templates?

          I am talking about conditions like:
          if condition="STYLEID=='X'"
          if condition="THIS_SCRIPT=='X'"
          if condition="$bbuserinfo=='X'"
          if condition="$bbuserinfo[fieldX]=='X'"
          if condition="$userinfo[fieldX]=='X'"
          if condition="in_array($forumid, array(X))"
          and others...

          Comment

          Loading...
          Working...
          X