Task #816

Claninfo maps page is very slow to respond

Added by tkxmoe over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:11/17/2009
Priority:Normal Due date:
Assignee:agent86 % Done:

100%

Category:Web
Target version:1.6.3
Blocking Target Version:

Description

Issue as discussed indepth on IRC,

http://pastebin.com/m46fc90eb

Causes CPU spike on MYSQL and causes hlstatsX to stop responding ingame for the duration of the query.

Same issue as seen here

http://forums.interwavestudios.com/topic/831-after-upgrading-from-1-5-6-to-1-6-1-cpu-usage-increase/page__view__findpost__p__4919

claninfo_map.patch Magnifier (2.3 kB) agent86, 11/17/2009 03:30 am

claninfo_mapperformance.php Magnifier (4.2 kB) agent86, 11/17/2009 03:30 am

Associated revisions

Revision 96:822da93c55e5
Added by psychonic over 2 years ago

[svn r1502] Fixed verbage on L4D/2 Protector award (reported by Eclyps19)
Added Taiwan to gmap location selection (#818) (Owen Lyu)
Fixed possible null error on playerhistory.php and tools_adminevents.php (#553)
Fixed utf8 character display issue on playerhistory.php and tools_adminevents.php.
Fixed slow query on claninfo_mapperformance.php (#816) (agent86)

Revision 95:822da93c55e5
Added by nshastings over 2 years ago

[svn r1502] Fixed verbage on L4D/2 Protector award (reported by Eclyps19)
Added Taiwan to gmap location selection (#818) (Owen Lyu)
Fixed possible null error on playerhistory.php and tools_adminevents.php (#553)
Fixed utf8 character display issue on playerhistory.php and tools_adminevents.php.
Fixed slow query on claninfo_mapperformance.php (#816) (agent86)

History

#1 Updated by tkxmoe over 2 years ago

Another query which seems to be inefficent,

db: hlstatsx
Command: Query
Time: 7
State: Locked
Info: SELECT
hlstats_Players.playerId,
hlstats_Players.connection_time,
hlstats_Players.lastName,
hlstats_Players.country,
hlstats_Players.city,
hlstats_Players.flag,
hlstats_Players.clan,
hlstats_Players.fullName,
hlstats_Players.email,
hlstats_Players.homepage,
hlstats_Players.icq,
hlstats_Players.game,
hlstats_Players.hideranking,
hlstats_Players.blockavatar,
hlstats_Players.skill,
hlstats_Players.kills,
hlstats_Players.deaths,
IFNULL(kills / deaths, '-') AS kpd,
hlstats_Players.suicides,
hlstats_Players.headshots,
IFNULL(headshots / kills, '-') AS hpk,
hlstats_Players.shots,
hlstats_Players.hits,
IFNULL(ROUND((hits / shots * 100), 1), 0) AS acc,
CONCAT(hlstats_Clans.name) AS clan_name,
activity
FROM
hlstats_Players
LEFT JOIN
hlstats_Clans
ON
hlstats_Clans.clanId = hlstats_Players.clan
WHERE
hlstats_Players.playerId = '10718'
LIMIT
1
20 rows in set (0.00 sec)

28 seconds

#2 Updated by agent86 over 2 years ago

Attached is a patch with a new set of SQL queries that are a bit easier on the DB. Needs testers!

#3 Updated by tkxmoe over 2 years ago

New claninfo_mapperformance.php much more efficient, reduced duration the query takes to execute and reduced mysql load.

#4 Updated by psychonic over 2 years ago

  • Target version changed from 1.6.2 to 1.6.3

#5 Updated by psychonic over 2 years ago

  • % Done changed from 80 to 90

Commited in r1502

#6 Updated by psychonic over 2 years ago

  • Status changed from UserFeedback to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF