[eluser]fchristant[/eluser]
Quote:That’s a nice idea, but I’m not sure it’s necessary. Simply connecting to a database should not cause any performance issues.
I agree, performance issues no, scalability issues yes. The number of open MySQL connections is one of the most important bottlenecks in scaling it.
Quote:Have you set pconnect to TRUE in database.php for your database connection?
This is a nice suggestion, but not what I'm looking for. I want a connection to be open for all queries of a controller, not beyond the life cycle of the page. Plus, persistent connections cause a lot of problems with multiple databases and transactions.
Quote:CodeIgniter is built with simplicity in mind, and whilst some things may be better implemented a differently, it’s still very efficient compared to a lot of other frameworks.
I agree about the simplicity and efficiency, and I'm a CI fan for sure. Still, it is important that robustness and making things work correctly are not sacrificed for these goals. Two examples:
- The bug I reported above. when using the db class as designed (using parameter replacement, a standard practice) and enabling caching, it does not work. I cannot believe this is not tested or found by someone else. Is everybody hardcoding SQL?
- Transactions. A previous disappointment I had was with transactions. Cache seems to influence it and nested transactions don't work, which is a showstopper if you need transactions, you want those for reliability. I had to go in and patch the core to make that work.
Things like this make me doubtful about the robustness of CI and whether I should use it for big/important sites. My point in summary: Yes, keep things simple and light, but above all...make sure it works first.