View Issue Details

IDProjectCategoryView StatusLast Update
0001975mantisbtbugtrackerpublic2003-12-13 04:44
Reportergyu Assigned Tojfitzell  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformIntelOSLinux, Win2kOS VersionMandrake 8.0
Product Version0.17.2 
Summary0001975: View all bug is slow
Description

view_all_bug_page.php 's bugnote count will slow down the performance

Steps To Reproduce

Disable the following code in view_all_inc.php (##### part)

grab the bugnote count

$bugnote_count = get_bugnote_count( $v_id );

/
$query = "SELECT UNIX_TIMESTAMP(MAX(last_modified)) as last_modified FROM $g_mantis_bugnote_table
WHERE bug_id='$v_id'";
$res2 = db_query( $query );
$v_bugnote_updated = db_result( $res2, 0, 0 );
/

TagsNo tags attached.

Activities

bretrzaun

bretrzaun

2002-05-16 01:50

reporter   ~0002570

Perhaps performance could be boosted by using some indexes. Currently there are only a few primary keys.

aarjona

aarjona

2002-05-16 07:04

reporter   ~0002571

Making it a configurable option would be even better.

vboctor

vboctor

2002-05-30 05:50

manager   ~0002731

We should compress the resulting HTML before sending it to the browser. This can be achieved by simply adding 'ob_start("ob_gzhandler");' at the start of the php script. We should do some testing whether it should be done for all Mantis pages or only for heavy ones like View Bugs and Summary. I did some testing on a local installation and there was considerable improvement. I believe compression will be even more effective when using mantis from an Internet server.

rep

rep

2002-05-30 07:38

reporter   ~0002734

Compression will marginially improve things but will be better for dialups. The problem I think mantis has is in the database access, not the shipping of data accross the network. I'm running mantis on a win2k box on an intranet. We have about 10 users, 6 projects and 500 issues and it feels a bit on the slow side considering the high bandwidth and small installation.

I'm glad to see that a time field has been added to the bottom of the footer. This will surely get people to be sensitive to speed.

vboctor

vboctor

2002-06-06 22:45

manager   ~0002821

Last edited: 2002-06-06 22:45

The html output buffering and compression is now supported. This feature requires PHP 4.0.4. To turn this feature on set $g_compress_html = ON. This is in the code now, and will be shipped with 0.18.0. Also did an optimisation on one of the queries. However, there is more work to be done to optimise the database access as rep mentioned.

edited on: 06-06 22:45

bretrzaun

bretrzaun

2002-06-07 02:54

reporter   ~0002822

Last edited: 2002-06-07 02:56

MySQL offers the EXPLAIN SELECT option to get more information about how queries are execute and which indexes are used.
<a href="http://www.mysql.com/doc/E/X/EXPLAIN.html">http://www.mysql.com/doc/E/X/EXPLAIN.html</a>

This should be helpful when looking at the queries which most surely are the bottleneck in here.

btw: the timestamp in the footer could be cut to 2-3 digits after the comma.

edited on: 06-07 02:56

rep

rep

2002-06-07 06:26

reporter   ~0002823

You have a problem with sub pico second timimg?

=>

jhuggins

jhuggins

2002-06-07 07:06

reporter   ~0002825

Last edited: 2002-06-07 07:09

Indeed more indexes are in order (specifically "mantis_bugnote_table.last_modified"), but let the authors complete the next round of overall design before we specify the new indexes.

edited on: 06-07 07:08

edited on: 06-07 07:09

jhuggins

jhuggins

2002-06-07 09:59

reporter   ~0002828

Last edited: 2002-06-07 10:05

After backing up your data, try these ALTER TABLE statements.

<a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/mantisbt/mantisbt/sql/db_add_indexes_2002-06-07.sql?rev=1.1">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/mantisbt/mantisbt/sql/db_add_indexes_2002-06-07.sql?rev=1.1</a>

Please, PLEASE report any changes in display speed in this bugnote thread.

edited on: 06-07 10:04

edited on: 06-07 10:05

jhuggins

jhuggins

2002-06-10 10:15

reporter   ~0002833

The SQL code in CVS has been modified to add these new indexes on install. There is also an update file as noted in a previous bug note.

rep

rep

2002-06-11 08:12

reporter   ~0002842

What was the timing difference on these changes? The clock tells the real story! Is there a test data set where we can get a good idea of the speed delta to validate that this change addresses the speed issue? I get this feeling that we are shotgunning this problem instead of really going after the root cause.

jhuggins

jhuggins

2002-06-11 08:27

reporter   ~0002843

I do not have a large enough set of data on my CVS test data or my two real installs of Mantis to measure a difference. I was hoping the bug reporter would be the one to try the ALTER TABLE statements, but I understand they may not want to mess with an otherwise working system.

I choose the indexes after examining every select statement I could find in the Mantis code. I am not done yet as the mainline developers are considering a few changes to the database schema.

Rest assured I am not shotgunning the problem. Several strategic indexes were missing and we probably need a few more for the rollout of 0.18.0.

Sincerely,
John

reporter

reporter

2002-06-12 07:15

reporter   ~0002850

Also, moving styles in a css, would keep from sending styles every time. And would allow a choice in available presentations (with alternate stylesheets)...

vboctor

vboctor

2002-06-12 14:56

manager   ~0002852

Prescience is already working on the CSS thing :)

vboctor

vboctor

2003-02-27 05:09

manager   ~0003864

This should be fixed as of 0.18.0a2. I will leave it to jfitzell to resolve.

jfitzell

jfitzell

2003-02-27 11:19

reporter   ~0003866

well it's a bit subjective, but I think we can consider this closed for now.

Related Changesets

MantisBT: master 4698818a

2002-06-10 13:16

jhuggins


Details Diff
I added several new indexes to the CREATE statements to hopefully address
the query speed concerns in bug 0001975.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1121 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0001975
mod - sql/db_generate.sql Diff File