Delphi For PHP Forums    


Go Back   Delphi-PHP Forums > General > General Discussion
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

General Discussion If it's not covered anywhere else, then talk about it here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2nd October 2008, 01:31
alquimista's Avatar
D4PHP Guru
 
Join Date: Aug 2008
Location: Guadalajara, México
Posts: 237
alquimista is on a distinguished road
Default Slow execution....

Hi,

I uploaded a small test application; it consists of a list of records (using DBRepeater), and a form to maintain each one's data.
Both forms inherit from a MasterPage that contains a logo, some header text and the MainMenu component.

When I was developing it, it took sometime to execute and I though it was because of the IDE and debugger stuff; now in the "production" web hosting... the execution it’s very slow: it takes 5 to 6 seconds to show 11 records Maybe it is because for each one, the "view", "delete", "change" icons are loaded per record? Those images were placed on the "BeforeShow" event of the component.
On column labels, I have links to sort the list on that column; it takes up to 8 seconds to sort and display... If I'd had 100 records, my user will be a bit mad on these execution speeds...

By the way, using IE 6 it takes less than in FF 3.

If those records where shown in a simple HTML table, it'd take less than a second to show them.

You can see the actual example here

What is causing these delays?

Thank you,
Guillermo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2nd October 2008, 02:38
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

It is all relative. You are using a large amount of file transfer

Documents (1 file) 123 KB
LyR - Lista de Bancos 123 KB
Images (6 files) 4 KB
http://www.gnsis.net/test/imagenes/GNW_Logo%2001.jpg 3 KB
http://www.gnsis.net/test/GNsis/imag...ction_edit.png 411 bytes
http://www.gnsis.net/test/GNsis/imagenes/search.png 391 bytes
http://www.gnsis.net/test/GNsis/imagenes/action_add.png 288 bytes
http://www.gnsis.net/test/GNsis/imag...ion_remove.png 195 bytes
http://www.gnsis.net/test/vcl/images/pixel_trans.gif 43 bytes
Objects (0 files)
Scripts (4 files) 983 KB
http://www.gnsis.net/test/vcl/qooxdo...k/script/qx.js 934 KB
http://www.gnsis.net/test/vcl/walter..._jsgraphics.js 23 KB
http://www.gnsis.net/test/vcl/compon...ult/scripts.js 20 KB
http://www.gnsis.net/test/vcl/js/common.js 5 KB
Style Sheets (2 files) 927 bytes
http://www.gnsis.net/test/vcl/compon...hemestyles.css 496 bytes
http://www.gnsis.net/test/vcl/compon...linestyles.css 431 bytes
Total 1111 KB

It takes about 7 seconds the first time in ie7.
Things you can do to speed it up.
don't use a couple of small qx controls if they can be replaced by html ones - once you have a big qx control then it makes no difference.
set you server up to send the files compressed. VCL for PHP :: View topic - Speed optimizations

use ajax especially the basic ajax to improve responses http://forums.delphi-php.net/ajax-ja...jax-d4php.html

Do more of your stuff in the browser w/js and in the same form.

Don't use so much inheritance and extra load times in the php. - not sure how much time this saves.

Both PHP and JS are interpretative languages Every time it loads it must re-interpret every line of code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 2nd October 2008, 18:18
alquimista's Avatar
D4PHP Guru
 
Join Date: Aug 2008
Location: Guadalajara, México
Posts: 237
alquimista is on a distinguished road
Default

Thank you 405hp !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 5th October 2008, 20:22
alquimista's Avatar
D4PHP Guru
 
Join Date: Aug 2008
Location: Guadalajara, México
Posts: 237
alquimista is on a distinguished road
Default

405hp,

I tested the compression option in php.ini with:

zlib.output_compression = on
zlib.output_compression_level = 8

The difference its important; at least 50% time response improvement

Thank you!

Guillermo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12th October 2008, 02:29
D4PHP Newbie
 
Join Date: Sep 2008
Posts: 9
takaya is on a distinguished road
Default

remove these code in php.ini

[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.JIT_enabled=on
debugger.JIT_host = clienthost
debugger.JIT_port = 7869
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12th October 2008, 02:43
alquimista's Avatar
D4PHP Guru
 
Join Date: Aug 2008
Location: Guadalajara, México
Posts: 237
alquimista is on a distinguished road
Default

Thank you Takaya ! now the app runs even faster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 04:51.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use