1

I'm building a site based on XAMPP on Windows. Currently it's in construction on my local machine only. Things are at good speed now. I use ajax to load some html content onclick of somethings. It's at ok speed but after some time those ajax requests especially for loading HTML get real slow. I enabled MySQL cache. Not much difference.

Please suggest a way to make this faster and if caching is the only option which way to go. Suggest a way so that it helps me in the future too.

Jakub Hampl
  • 39,863
  • 10
  • 77
  • 106
  • 1
    1. Is the problem occurring randomly? 2. Have you benchmarked your sql-queries to see how long they take? 3. Do you use a 3rd party framework or any 3rd party tools? – rzetterberg Apr 10 '11 at 11:27
  • 1
    Considering we don't know how your website works, it'll be hard to give some precise advise ; but you might want to take a look at my answer on this question, for some general ideas : http://stackoverflow.com/q/1260134/138475 – Pascal MARTIN Apr 10 '11 at 11:27
  • Install firebug, and once the site starts getting slow have a look at your console/net panel to see where all the time is going. Post the results here – JohnP Apr 10 '11 at 11:27
  • Quick question, is it slow on the server side or the client side? (If you refresh the page, does it speed up?) – J V Apr 10 '11 at 11:28
  • @Pascal MARTIN that answer you pointed to was _AWESOME_! Was looking for exactly that for a project I'm working on – JohnP Apr 10 '11 at 11:32
  • @pascal - thanks as its huge it'll take some time for me to read itself – rajprashanth r Apr 10 '11 at 11:35
  • @ JV - it gets faster when it is refreshed. so what does it mean? – rajprashanth r Apr 10 '11 at 11:36
  • @ancide - 1. not randommly , 2.not yet i'll see them first, 3.no third party thing. everything is done from scratch by me – rajprashanth r Apr 10 '11 at 11:37

1 Answers1

0

First you will have to look at your database schema, maybe the problem is there.

  • Did you look at the slow query log?
  • All your index are correct? (try the explain on your query to see)
  • what is the size of the output HTML?
  • did you enable output compression?
  • how long does it takes to execute the request? (including sql, html output etc...)

Also, did you try in a LAMP environment?

Tip: you can use memcached that will help speed up your output for large load situations.

yaleman
  • 17
  • 6
Eric
  • 21
  • 1