Jump to content

Revision 902: fixed #215, fixed #204


Nabeel

Recommended Posts

  • Administrators

fixed #215 and #204

View more details, download from here

Huge speed changes in this, finally utilizing the cache layer. Make sure core/cache is writable, but you should be able to see stuff being cached in there. Also, if you have an htaccess, make sure no one can get into the /core folder. Cache stays for varying lengths, but should be refreshing properly. At least 20% increases - stats have a nominal 3 minute cache on them, other things have maybe an hour to 24 hours. If there's changes, the cache is updated. On every page the cache eliminates at least 4 db calls.

Another is a maintenance script, which isn't completed yet, but if you have access to cron, you can set USE_CRON to true, and then set that script (admin/maintenance.php) to run nightly. Also alleviates 4/5 db calls for the "fake cron" which runs. Combined with above, it's about 10 calls which are gone. Yay for speed :)

  • Like 1
Link to comment
Share on other sites

update.php

phpVMS Updater

Starting the update...

Update completed!

checkinstall.php

phpVMS Virtual Airline Administration Software

Install Check

Checking PHP version

[OK] PHP version is 5.3.x

Checking connectivity...

[OK] Can contact outside servers

Checking for SimpleXML module...

[OK] SimpleXML module exists!

Checking file hashes for corrupt or mismatched files

[Error] /lib/js/jquery.form.js doesn't exist

-- Checked 168 files, found 1 errors

/

copied the new layout.tpl

and Running fine so far :)

Link to comment
Share on other sites

Nabeel,

found a problem

when a pirep is accept the following warning is given

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Link to comment
Share on other sites

  • Administrators

Nabeel,

found a problem

when a pirep is accept the following warning is given

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Warning: file_exists() expects exactly 1 parameter, 2 given in /usr/local/www/www.kafly.net/core/classes/CodonCache.class.php on line 236

Ah, you can fix that for now.. just open that file, goto that line, remove this:

", $value"

Link to comment
Share on other sites

Corrected and working good so far

I hope this reduce the amount of Joins performed without indexes on my mysql server

on 24 hours i got 12294 of them , I will try to check which joins are generating this bottleneck and inform but this is a really p4 bug (nice to have fixed someday , but not essential right now)

Link to comment
Share on other sites

  • Administrators

Corrected and working good so far

I hope this reduce the amount of Joins performed without indexes on my mysql server

on 24 hours i got 12294 of them , I will try to check which joins are generating this bottleneck and inform but this is a really p4 bug (nice to have fixed someday , but not essential right now)

Sheesh.. I usually check with that. Can you enabled mysql_slow_query_log and let me know what they are? I can add indexes to those which are missing. I usually leave that on in development, haven't really seen anything non-indexed (I obsess over those :P. But I only join on IDs and those are indexed, but I'll try combing through the log tonight too.

Link to comment
Share on other sites

What's the code you put for your layout?

Did you put the:

<?php echo $page_content; ?>

Where the content would show?

I am not using the layout.tpl on my site.

edit:I just added the layout tpl in my skins folder an no no header or footer :P but the content shows

Link to comment
Share on other sites

So you didn't change anything with your skin? Lemme take a look.

thanks

without the layout.tpl I get vmac screenshot1.jpg

With the layout.tpl I get this

vmac screenshot2.jpg

Edit2: I can not change skins either an here is what I get when I try

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php  on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236

Warning: Wrong parameter count for file_exists() in /hermes/web06b/b338/pow.llju1/htdocs/core/classes/CodonCache.class.php on line 236
Settings were saved!
Site Settings

Link to comment
Share on other sites

Sheesh.. I usually check with that. Can you enabled mysql_slow_query_log and let me know what they are? I can add indexes to those which are missing. I usually leave that on in development, haven't really seen anything non-indexed (I obsess over those :P. But I only join on IDs and those are indexed, but I'll try combing through the log tonight too.

Well enabling the mysql_slow_query timed at 1sec the slow query I have is

use kaflynet;

SET timestamp=1268811003;

SELECT a.*, a.name AS aircraft,

COUNT(p.pirepid) AS routesflown,

SUM(p.distance) AS distance,

SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime,

AVG(p.distance) AS averagedistance,

AVG(p.flighttime) as averagetime

FROM phpvms_aircraft a

LEFT OUTER JOIN phpvms_pireps p ON (p.aircraft = a.id)

GROUP BY a.registration;

looking at the website this query is not phpVMS , but the addon Fleet table , I will keep monitoring and see if any other show up also I will see If I can speed increase this query

Thank you

Link to comment
Share on other sites

×
×
  • Create New...