1
comegona
wordbook and cache
  • 2004/8/17 17:49

  • comegona

  • Not too shy to talk

  • Posts: 165

  • Since: 2003/11/9


I have over 177000 entries in the Wordbook module and I turned Cache on to 3 Days so as to have the pages load faster. This doesn’t happen. Every time I access the index page of Wordbook it takes a long time to load. I’m not too sure how the cache works but is it supposed to store the information that was accessed in templace_c directory, then when someone calls the same page it just loads that instead of querying the database?

2
hsalazar
Re: wordbook and cache
  • 2004/8/17 19:36

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


comegona:

Wow! That's certainly a lot of entries. I never thought the sheer size of the content could be troublesome, but now that you mention this, I suppose the problem comes not from the module itself but from the fact that the module's index page includes three blocks: latest, most popular and random entries. My guess would be that the module goes over all entries when determining latest and most popular...

From this, I guess I need to reasess the display strategy. An idea might be to have separate tables to hold the id numbers of the latest and the most popular entries, so the module doesn't go over all the entries... I'll have to think about it.

Thanks for the feedback. It's good to know that even in its present state, the module has proven useful.

Cheers.

EDIT: Just visited your site. It takes forever to refresh the pages. The module will need to be completely rebuilt, hopefully with the help of some database wizard.


3
rowdie
Re: wordbook and cache
  • 2004/8/18 0:07

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


I had a quick look at the sql queries and my suggestion would be to change the way you check for $totalwords. Do a SELECT count(*) from the table, instead of reading in all the entries. As far as I can see you don't use the $words variable for anything else, though it was just a quick look, like I said, so correct me if I'm wrong :)

Anyway, just a suggestion and I hope it helps...

Rowd

4
hsalazar
Re: wordbook and cache
  • 2004/8/18 5:48

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


rowdie:

Thanks for the suggestion. As you'll probably see in my code, I was worried about making it work and certainly used no tactics or strategy to build efficient queries. As I learn more about how to do things, I'll build more efficient modules, but hey, it might take long... :)

Cheers.

Login

Who's Online

126 user(s) are online (71 user(s) are browsing Support Forums)


Members: 0


Guests: 126


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits