0
PHP code request
Started by
Sphere
, Mar 22 2008 07:52 PM
24 replies to this topic
#16
Posted 24 March 2008 - 11:27 AM
I tried the ++ for each query, but it returns me a 0... for some unknown reason
The memory_get_usage I didn't know about though, gonna experiment with that tonight I think
The memory_get_usage I didn't know about though, gonna experiment with that tonight I think
#17
Posted 24 March 2008 - 05:52 PM
Sphere, on Mar 24 2008, 06:27 AM, said:
I tried the ++ for each query, but it returns me a 0... for some unknown reason
$num_queries = 0; function Query() { // query runs here global $num_queries; $num_queries++; }
#19
Posted 24 March 2008 - 08:16 PM
The author of the Evolution CMS says that everything you need is in these 2 files.
mysql.php 13.41K 3 downloads
mysqli.php 12.72K 3 downloads
Hope that helps.
mysql.php 13.41K 3 downloads
mysqli.php 12.72K 3 downloads
Hope that helps.
#20
Posted 24 March 2008 - 08:53 PM
Ok, got the query count working, except sadly for the AJAX queries, because those build the page, then insert the query results....
Ah well, it works
The memory_get_usage() function doesn't work on my server, and replacement (exec-function) is not allowed (how surprisingly ), so I need a workaround for that still.
And yes, the folks at PHP-NUKE can write their code better then me.... but hey, I'm still in development of improvement!
I already cleaned up like 50% of the useless junk I wrote a year ago
Ah well, it works
The memory_get_usage() function doesn't work on my server, and replacement (exec-function) is not allowed (how surprisingly ), so I need a workaround for that still.
And yes, the folks at PHP-NUKE can write their code better then me.... but hey, I'm still in development of improvement!
I already cleaned up like 50% of the useless junk I wrote a year ago
#21
Posted 25 March 2008 - 03:26 AM
Sweet! Nice work Sphere!
0.18 seconds page load is pretty impressive. Are you using file cache or SQL cache?
0.18 seconds page load is pretty impressive. Are you using file cache or SQL cache?
#22
Posted 25 March 2008 - 07:21 AM
SQL cache, 90% of the page is SQL
It doesn't count in the Youtube and external image load btw
Ow, don't mind the amount of SQL queries, that's a bug I haven't figured out yet.
It doesn't count in the Youtube and external image load btw
Ow, don't mind the amount of SQL queries, that's a bug I haven't figured out yet.
#23
Posted 25 March 2008 - 08:15 AM
Sphere, on Mar 25 2008, 03:21 AM, said:
SQL cache, 90% of the page is SQL
Interesting. I disable my server cache to ease load but I may have to rethink that. Thx.
Quote
Ow, don't mind the amount of SQL queries, that's a bug I haven't figured out yet.
I'm averaging 52 queries per page for a forum. It's usually 0.9 to 1.3 seconds per page load. How many tables are you carrying?
#24
Posted 25 March 2008 - 09:23 AM
banj0, on Mar 25 2008, 09:15 AM, said:
Interesting. I disable my server cache to ease load but I may have to rethink that. Thx.
I'm averaging 52 queries per page for a forum. It's usually 0.9 to 1.3 seconds per page load. How many tables are you carrying?
I'm averaging 52 queries per page for a forum. It's usually 0.9 to 1.3 seconds per page load. How many tables are you carrying?
Well, the SQL chaching does increase server loads, but speeds up the page load when the server can handle it. If the server can't handle big caches very well, you'd better not use it
But for proof that there's some sort of error with the query count, check the photoalbum, it's completely AJAX, no SQL query whatsoever, and it still says 32 queries...
#25
Posted 26 March 2008 - 05:13 AM
Sphere, on Mar 25 2008, 05:23 AM, said:
But for proof that there's some sort of error with the query count, check the photoalbum, it's completely AJAX, no SQL query whatsoever, and it still says 32 queries...
That is pretty weird.
As for the cache thing, I think I'm gonna turn on file caching and then try SQL and compare the 2. Might as well load it up and see how she flies. Plus it's shared so what the heck do i care, lol.
Your site is looking good bro! Nice job!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users