If you are parsing data into tree structures (such as using a DOM parser), you need to be aware that those structures can get awfully big awfully fast, and that can leave you out of fast memory and doing a lot of paging (or swapping to disk if things get really bad). So can things like Schlemiel the painter's algorithm - make sure that if you are iterating over a collection of data that you aren't counting up from zero every time. Are you doing the same thing over and over again when you don't have to? Things like making the same request to the database over and over again instead of getting the data once into a variable or object and using it over and over again from there can make a huge difference. Xampp vs wamp code#Second, take a good look at the code you're running. And use your browser's developer toolset if it's still slow it will tell you a lot.)įirst, do you have enough memory in your machine to run both the server (servers, really, since you are running both Apache and MySQL) and the browser at the same time effectively (along with whatever else you may have open, and the operating system as well)? If you are using an old machine or something like a netbook, try closing everything you don't need. (You can check to see if it's the browser by creating a static HTML version of your page to take PHP and the database out of the equation. especially JavaScript that touches the DOM repeatedly) and you aren't waiting for external HTTP requests (fonts, stylesheets, JavaScript libraries, advertisements, social media widgets, and that sort of thing), then there are a few things you can look at. If you're sure that it's not code running in the browser (JavaScript, Flash, etc. XAMPP isn't slow by nature (nor is WampServer). There are an awful lot of reasons why a page may be slow, and not all of them have anything to do with the server end.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |