Expensive Logic in my Custom Blocks...maybe?
Permalink Browser Info Environment
Hello Jordan...
I've got everything working and displaying perfectly, so Thank You!
Now I've just got this problem with (no) speed. Pingdom tests show that it takes 20 to 30 seconds for the site to load...
I'm wondering if it's because the logic I'm putting in these Custom Blocks is Expensive?
According to the Speed Up C5 post...
Putting block startup logic in the block constructor (the __construct) method = BAD
Sticking your block startup logic in a method named "on_start" = GOOD.
I've looked for other posts on block-building, I've looked at other blocks...where and how do you make an "on_start" method? In the Designer Content package? In the custom block?
I attached a file of my view.php for Sports (there's a bit of logic testing here)...I don't enough of PHP to know if this logic and that of 3 other custom blocks might be grinding everything to a crawl...
I know yer busy with all your programming and buoying the morale of struggling users with your wealth of information, but when you are able, could you tell me where to begin?
Thanks again...
James
I've got everything working and displaying perfectly, so Thank You!
Now I've just got this problem with (no) speed. Pingdom tests show that it takes 20 to 30 seconds for the site to load...
I'm wondering if it's because the logic I'm putting in these Custom Blocks is Expensive?
According to the Speed Up C5 post...
Putting block startup logic in the block constructor (the __construct) method = BAD
Sticking your block startup logic in a method named "on_start" = GOOD.
I've looked for other posts on block-building, I've looked at other blocks...where and how do you make an "on_start" method? In the Designer Content package? In the custom block?
I attached a file of my view.php for Sports (there's a bit of logic testing here)...I don't enough of PHP to know if this logic and that of 3 other custom blocks might be grinding everything to a crawl...
I know yer busy with all your programming and buoying the morale of struggling users with your wealth of information, but when you are able, could you tell me where to begin?
Thanks again...
James
Type: | Discussion |
---|---|
Status: | New |