brustj / tracmor

Automatically exported from code.google.com/p/tracmor
GNU General Public License v2.0
0 stars 0 forks source link

Opening asset records takes an unreasonable amount of time #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Log into a Tracmor instance with a fair number of assets (tested with ~2000)
2. In the Assets module, click an asset code to open an asset record.

What is the expected output? What do you see instead?
The asset record should open in a reasonable amount of time.  Instead it
takes about 10 seconds to load the page.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by jsincl...@gmail.com on 28 Apr 2009 at 7:48

GoogleCodeExporter commented 8 years ago

Original comment by jsincl...@gmail.com on 28 Apr 2009 at 7:50

GoogleCodeExporter commented 8 years ago

Original comment by jsincl...@gmail.com on 28 Apr 2009 at 10:19

GoogleCodeExporter commented 8 years ago
Try to disable auto-load search data for the SearchTool.
I think this is the main cause of the problem.

/inludes/qcodo/qform/QAssetSearchComposite.class.php

function dtgAsset_Bind() should search data only if search button pressed, or
non-ajax request received (The second condition required for the "Assets" 
shortcut).

Original comment by eremi...@gmail.com on 7 May 2009 at 8:33

Attachments:

GoogleCodeExporter commented 8 years ago
Vlad - yeah let's give it a try.

Original comment by hunterje...@gmail.com on 7 May 2009 at 10:23

GoogleCodeExporter commented 8 years ago
QAssetEditComposite.class.php,  Line 286:
$objAssetModelArray =
AssetModel::LoadAll(QQ::Clause(QQ:rderBy(QQN::AssetModel()->ShortDescription)));

Executes in ~4 sec. I'll try to optimize loading speed.

Original comment by eremi...@gmail.com on 15 May 2009 at 6:10

GoogleCodeExporter commented 8 years ago
I made the changes. Now asset edit page is loaded for 3-4 seconds for
me. It was 12 seconds without code-optimization.

Please review the code. See the attachment for the changed files.

Original comment by eremi...@gmail.com on 17 May 2009 at 3:44

Attachments:

GoogleCodeExporter commented 8 years ago
Issue with this change:
Load an Asset Edit page, click the Move, Check Out, or Reserve buttons. Error:

Fatal error: Call to a member function SetupDisplay() on a non-object in
C:\xampp\htdocs\tracmor\assets\asset_edit.php on line 805

This is because QAssetTransactionComposite is not being created before you try 
to run
SetupDisplay() on it. We must create it when we click btnMove/checkout/check
in/reserve/unreserve.

Original comment by hunterje...@gmail.com on 20 May 2009 at 12:49

GoogleCodeExporter commented 8 years ago
The load time has been improved and is acceptable for now. 

Original comment by jsincl...@gmail.com on 6 Jun 2009 at 1:21