AtomBB Forums

AtomBB Forums

Loading..
Loading..
Loading..
For the best results, view the site in Firefox.
Dev Blog: Rewriting the Queries
I've moved more procedural logic into the main class. It's currently in some sort of limbo, just in
case the object causes too much overhead or lag to make it easy to revert.
Surprisingly enough, the PHP side is two times slower than the MySQL side. This might be due to
doing the profiling on my computer rather than on a hosting account.

I'm not going to rewrite all of the queries into something that's asynchronous. It's not a magic
bullet after all, especially.. Not on PHP. I must note that it's own asynchronous as far as blocking
the script is concerned. Only one query can run at a time and balancing this from the framework side
has been somewhat challenging.

Quote

Fatal error: Commands out of sync; you can't run this command now in
C:\censored\abbMaster\hadron\class_error.php on line 33


And this is what happens when the queries aren't in the right order (Yes, I test this on Windows), which surprisingly.. Is very
easy to do. True asynchronous queries would be very nice, but that would be a feature of the
client-server protocol rather than something which PHP alone can provide and it would cause
performance enhancements as I wouldn't have to balance things on the framework end.

More balancing might be possible with multiple connections to the database and I might add that as a
config file setting for those who want to speed-up individual requests. Two database connections
would at the very least stop the synchronous queries from forcing the script to wait for the
asynchronous queries to complete.
Comments
I test my stuff on Windows too!!! Windows is the best!!!
No idea why we're bumping 5 month old dev blogs that are no longer relevant ;)
Regards
- Sajuuk

This is a signature....