Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon/Db/Adapter/Pdo->__construct slow?


I would like to ask you if it's normal for "Phalcon/Db/Adapter/Pdo->__construct" to take 1 second? When I check this forum with Firebug, waiting time is 240ms, so I guess 1 second is too long for the PDO.

The measurement is made on wampserver.

Best regards.


Phalcon/Db/Adapter/Pdo->__construct is not slow itself but connecting to a database is, try changing localhost by

edited May '14

Thank you for your answer. Same speed with, but if it's a problem with my local pc is not that important, the thing is that when uploaded on hosting it takes same time to wait. is on Bluehost shared hosting loaded thru custom php.ini (mod_suphp.c in .htaccess). If this can effect database connection speed.

I guess I misunderstood. The speed was the same when I enter instead localhost in the browser. When I changed it in the bootstrap file it worked! Phalcon is great! I tryed it in ubuntu too and is very fast!

For Bluehost it didn't worked though. It's still slow. Could the reason be that is precompiled and then uploaded on the server?

Regarding shared hosting issue I found this: It worked reducing waiting to 400 - 500 ms. I guess using VPS will give better results. Great.