[Arantor's Rants] Argh.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Arantor's Rants] Argh.
« on August 19th, 2011, 05:38 PM »
Today has been a fuckup, and I'm really confused why things ended the way they did. OK, let me explain.

For the last 8 years, ever since I first dipped my toes into PHP, I've been running Apache, MySQL and PHP as separate components and making them work nicely together. Back then I was building on Linux, and doing it from source because my distro at the time didn't have anything useful to give me, and I guess I just ended up rolling with it.

So, now we make MySQL 5.1 a minimum and I find myself with a problem.

For reasons far too complicated to remember, I used to use MySQL 5.1 with a 5.0 connector. This fails in the installer, because it tests both the connector/client and server versions, because it's possible you'll end up using a stupid old connector with a current DB version - like I was, only it's possible to break more things than I had.

Cue an afternoon of trying to mix and match versions of things to make it all work properly, the best result I had was that PHP wouldn't load the MySQL libraries, and the worst was that PHP would crash if you tried to make a query.

So in the end I went to WampServer. After a little bit of brain ache trying to restore the virtual hosts that I have, because I have specific and weird configurations for things, I finally make it all work.

Then I go through the Wedge installer to verify it works, and it does.

Then I find something I do not understand, and after an afternoon of frustration, I'd like it to stop being a problem. I refer to the footer I encountered... "Page created in 1.10 seconds with 12 queries."

There is absolutely no fucking reason why it should be that slow on my PC. The queries aren't slow, in fact the queries aren't the problem in the slightest... Pulling up the query log shows me that the very first query occurs at in ...\Sources\Load.php line 37, which took 0.00071096 seconds at 1.04372096 into request.

So it's taking over a second before it even gets to actually do anything. :wow: So, I'm really, really confused as to what the hell's going on.

The only comfort is that this might be the first time I play with XDebug (as opposed to other debuggers) to figure out WTF is going on.
[Arantor's Rants] Re: Argh.
« Reply #1, on August 19th, 2011, 05:51 PM »
OK, so I've got to play with XDebug, which will really help me (since before I did benchmarking in all kinds of ... interesting ways)

mysql_connect is the culprit for this performance suckage, and I have no idea why that should be, but it is consistently consuming 80%+ of the runtime of the script :/
[Arantor's Rants] Re: Argh.
« Reply #2, on August 19th, 2011, 06:08 PM »
I wonder if switching to mysqli will make a difference, I suspect not, because I have a feeling this is ultimately caused by the mysqlnd internal driver, but we'll see.

I'll try it later when I get back from going out.
Posted: August 19th, 2011, 06:07 PM

Oh and just to clarify; it isn't Wedge's fault. SMF does exactly the same on my setup.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
[Arantor's Rants] Re: Argh.
« Reply #3, on August 19th, 2011, 06:19 PM »
Well, looks like a fun day to you :P

When I woke up this morning, I had a huge headache... It stayed there for about 6 hours so I was unable to work. I simply plugged in my Wii and started playing Xenoblade. (Cool game, BTW.)
It's actually the first time of the day I'm on my computer. (And only for a few minutes because I'm busy IRL and outside Xenoblade[1].)
 1. ...which crashed on me because I had the wonderful idea to visit a large area and unlock a few teleport points, and it just happened that one of the points was the target for a main quest, so when it asked me to go there by foot during the main quest, I simply teleported there and voilà, it crashed... Very funny. So what?