Speed up PHP with JSON and AJAX
January 27, 2014
So we decided to work on streamlining and speeding up StudioWeb’s basic functionality. When it comes to user perceptions of a web application’s speed, the most important thing to look at is the request/response cycle. But first, the most obvious thing you can do, is to just increase your server’s speed:
- More RAM
- More CPU
- Faster disk drives
- Empty disk drives – <50% full disk always move much faster.
… New servers are coming very soon to StudioWeb. In the meantime though, there are things you can do the application’s code itself.
AJAX with JSON
StudioWeb makes heavy use of AJAX to submit answers to the server for processing. So we decided to utilize JSON to send the data – rather than posting just a raw strings of text. What we get out of this, is a much faster response time from the users point of view.
… But now I am getting deep into nerd territory. All you need to take away is that using JSON to pass information to and from a server can speed up things a lot.