ThunderAI Posted December 15, 2006 Share Posted December 15, 2006 Here is a typical datagrid I built which i use and I was curiouse if there was any speed enhancements I could give to it.Thanks for your assistance.[url=http://www.watertownsdairport.com/example.txt]www.watertownsdairport.com/example.txt[/url] Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/ Share on other sites More sharing options...
taith Posted December 15, 2006 Share Posted December 15, 2006 firstly...the more comments in the page, the larger the file, the larger the file, the longer it takes to load it (serverside). Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141861 Share on other sites More sharing options...
taith Posted December 15, 2006 Share Posted December 15, 2006 secondly...[code]$adataselect[0] = "";...[/code]is much faster set once[code]$adataselect = array('','','','','');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141868 Share on other sites More sharing options...
obsidian Posted December 15, 2006 Share Posted December 15, 2006 It may be simply because I did a quick once over of it, but I didn't notice any paging of any sort. Do you have any sort of pagination or buffer for queries that are going to return an inordinate amount of records? That will speed up a data grid immensely. Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141871 Share on other sites More sharing options...
obsidian Posted December 15, 2006 Share Posted December 15, 2006 [quote author=taith link=topic=118754.msg485564#msg485564 date=1166206046]secondly...[code]$adataselect[0] = "";...[/code]is much faster set once[code]$adataselect = array('','','','','');[/code][/quote]As far as that goes, if you're buffering your input into the arrays, why do you need to populate the values with empty strings in the first place? Just create an empty array for what you're after, and then assign the values of the keys as need be:[code]<?php$adataselect = array();// Later in the code$adataselect[4] = "Whatever";?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141875 Share on other sites More sharing options...
ThunderAI Posted December 15, 2006 Author Share Posted December 15, 2006 I have thought about this before, it is not too hard to do, i'll give it a shot. Thanks[quote author=taith link=topic=118754.msg485564#msg485564 date=1166206046]secondly...[code]$adataselect[0] = "";...[/code]is much faster set once[code]$adataselect = array('','','','','');[/code][/quote] Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141903 Share on other sites More sharing options...
ThunderAI Posted December 15, 2006 Author Share Posted December 15, 2006 There is no buffering or paging of any kind. From what I have read, I wont beable to buffer the text because all of it is inside of a table. Oddly enough, I dont understand why the queries take much longer with PHP and MySQL then they do with ASP and Access.. Seems to run countrary to what I expected from the migration.[quote author=obsidian link=topic=118754.msg485568#msg485568 date=1166206126]It may be simply because I did a quick once over of it, but I didn't notice any paging of any sort. Do you have any sort of pagination or buffer for queries that are going to return an inordinate amount of records? That will speed up a data grid immensely.[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/30771-please-help-review-my-datagrid-for-speed-enhancements/#findComment-141905 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.