different strategies to cache stuff / speed up pages

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

different strategies to cache stuff / speed up pages

Alex Betz-2
Many thanks to every body who chimed in on the previous thread. However, I
was after a comparison of the different strategies of caching data.

1) thread objects

2) custom types with data preloaded onCreate

3) mem cached

4) lasso caching

For which problems should one use which strategy?
What are the advantages, what are the disadvantages of these strategies?
What are the limitations?
Are there any drawbacks/pitfalls?
Any tips or experiences - good and bad?

Cheers
Alex

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: different strategies to cache stuff / speed up pages

Jolle Carlestam-2
14 mar 2015 kl. 12:46 skrev Alex Betz <[hidden email]>:

> 1) thread objects

Thread objects main issue is their on-at-a-time approach. If you plan on using them, make them small and lean.

> 2) custom types with data preloaded onCreate

Works for a lot of situations.

> 3) mem cached

Is a major commitment tha trequires additional hardware. Only to be used if you see major traffic volumes hitting your site

> 4) lasso caching

No idea.

One thing you don’t bring up is writing your dynamic data to files when it changes and then call them as includes. Lasso 9 does not suffer from the same time penalty that Lasso 8 did in regards to reading files. On the contrary Lasso 9 is very fast in this area. I have my settings stored in files nowadays. You could explore writing to a file, or several, each time the data is changed and then simply call the file as include when needed. This could be raw data that is mined and transformed to whatever suits your needs, maps, arrays, whatever. Or ready to use html snippets to be included.

HDB
Jolle

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: different strategies to cache stuff / speed up pages

decorior
OK!

I did not know this




> On Mar 14, 2015, at 10:36 AM, Jolle Carlestam <[hidden email]> wrote:
>
> One thing you don’t bring up is writing your dynamic data to files when it changes and then call them as includes. Lasso 9 does not suffer from the same time penalty that Lasso 8 did in regards to reading files. On the contrary Lasso 9 is very fast in this area. I have my settings stored in files nowadays. You could explore writing to a file, or several, each time the data is changed and then simply call the file as include when needed. This could be raw data that is mined and transformed to whatever suits your needs, maps, arrays, whatever. Or ready to use html snippets to be included.


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: different strategies to cache stuff / speed up pages

Wade Maxfield
In reply to this post by Jolle Carlestam-2
On 15/03/2015, at 5:36 AM, Jolle Carlestam <[hidden email]> wrote:
>
> You could explore writing to a file, or several, each time the data is changed and then simply call the file as include when needed. This could be raw data that is mined and transformed to whatever suits your needs, maps, arrays, whatever. Or ready to use html snippets to be included.

I use this basic method of generating include files with HTML code, HTML code with lasso logic as well, and Lasso variables as maps and arrays, and have done so for as long as I can remember (still on 8.5 though).  

One example is a site with 3 different types of advertising slots, where any slot can show up to 2 of that kind of ad from a list of 0-10 available at any one time. Using a MySQL rand() to sort by (because we want some randomness to the display order) doesn't play nice with MySQL caching. I build a list of available ads as a Map, then individual arrays of the IDs for each type, then randomly pick from the arrays.  The Map and Arrays are all in a single include file for ads that is updated daily (due to start and end dates of ads) and also as the ads are edited.  

I don't have speed comparisons of one method against another, and haven't noticed any apparent performance hit to using includes, but I am cautious to minimise the depth of includes more than the number of includes.

 - Wade



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: different strategies to cache stuff / speed up pages

Jolle Carlestam-2
15 mar 2015 kl. 04:58 skrev Wade Maxfield <[hidden email]>:

> I don't have speed comparisons of one method against another, and haven't noticed any apparent performance hit to using includes, but I am cautious to minimise the depth of includes more than the number of includes.
>
> - Wade

Just so you know, kids. I remember shortly after I started working for Amtac that Rick showed me Wades major site. And the main thing that struck me was how amazingly fast it was in loading some really complex content. If he says this is a good approach, I’d listen. :-)

HDB
Jolle

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>