Support Forums
AChecker
Optimizing ChecksDao class
You must be signed-in to post.
| Author | Subject | |
|---|---|---|
| Page: 1 | ||
| emidiostani | Subject: Optimizing ChecksDao class | |
| Hi all, I am noy expert in PHP but I noticed that ChecksDao has 2 methods that could be optimized: getAllOpenChecks() getCheckByUserID($userID) the method getAllOpenChecks() is used only by AccessibilityValidator class. This method returns an entire row of a Check while the class uses only the check_id and func columns, why don't change the query ? the method getCheckByUserID($userID) is used only by UsersDAO class. This method returns an entire row of a Check (for an user id) while the class uses only the open_to_public (when equal 0) and check_id columns, why don't change the query and optimize the code of UsersDAO ? Best regards, Emidio Stani Posted: 2010-06-27 05:17:36 | ||
| cindy | Subject: Re: Optimizing ChecksDao class | |
| Thanks for looking into the code. Our design perspective is to return all the information that might be required by other objects so that when more fields are requested by others, we don't need to revisit the method. The same reason applies to your other threads. Posted: 2010-06-28 08:53:11 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| No problem, I am happy to help. Indeed what I was trying to understand is where it is possible to save memory and moreover time. For example it would be nice to give more than 1 url in order to have a generic report and discover the most common accessibility problems in a website but achecker still takes time to parse 1 page. Where do you think is the bottleneck ? Posted: 2010-06-28 14:25:37 | ||
| cindy | Subject: Re: Optimizing ChecksDao class | |
| Your help is truly appreciated. With nowadays cpu power and memory, although I don't think returning only a couple fields would improve the processing speed, I could test the difference when I have time. Or you might like to try. The necks I ever noticed are 2 places, 1. html parser 2. basic function parser. If the basic functions provided to check creators were replaced by direct calls in script, the speed improvement would be noticeable. This layer gives users more control though. Posted: 2010-06-28 14:53:05 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| Ok I will have a look in that direction. In meantime I noticed that you are using simple html dom version 0.98 but there is 1.11 (released after 6 months), maybe you could try to verify if you have an increase of performance. Ciao ! Posted: 2010-06-28 16:05:29 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| up Posted: 2010-06-30 05:11:32 | ||
greg![]() | Subject: Re: Optimizing ChecksDao class | |
| We're off for a 4 day weekend (Canada Day), and Cindy is off on holiday for a week. Keep posting your comments, but it might be a little while before you get a response. thanks Posted: 2010-06-30 15:30:03 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| Thanks, I will not spam :-) greetings from an italian living in Belgium, Emidio Posted: 2010-06-30 15:33:23 | ||
greg![]() | Subject: Re: Optimizing ChecksDao class | |
| Da dove, in Italia Posted: 2010-06-30 15:36:28 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| Taranto, Puglia Posted: 2010-06-30 15:38:10 | ||
greg![]() | Subject: Re: Optimizing ChecksDao class | |
| Provo il mio italiano. Ho visitato Italia in 2055, a la sud, e 2007 a la nord, ma non ho visitato Puglia. Miei amici a Bologna dicono che Puglia e' un bello parte del paese. La prossima volta visitarai Puglia. Posted: 2010-06-30 16:23:14 | ||
| emidiostani | Subject: Re: Optimizing ChecksDao class | |
| Almost there :-) Have a good evening Greg, here is alread 11 PM. A presto ! Posted: 2010-06-30 16:47:12 | ||
| Page: 1 | ||
You must be signed-in to post.


