Jump to ContentJump to Navigation/Login
` ` ` ` ` `

[Register]

Occasional ATutor release updates


No Members Logged In

(9 guests in past 15 min.)

Access Understanding Web Accessibility to learn about accessibility, or Register to take the course for FREE.

Support Forums

AChecker

Optimizing ChecksDao class


You must be signed-in to post.

AuthorSubject
  Page: 1
emidiostani
Subject: Optimizing ChecksDao classQuote this post in your reply
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

Avatar for cindy
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
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 classQuote this post in your reply
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

Avatar for cindy
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
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 classQuote this post in your reply
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 classQuote this post in your reply
up
Posted: 2010-06-30 05:11:32
greg

Avatar for greg
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
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 classQuote this post in your reply
Thanks, I will not spam :-)

greetings from an italian living in Belgium,

Emidio
Posted: 2010-06-30 15:33:23
greg

Avatar for greg
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
Da dove, in Italia
Posted: 2010-06-30 15:36:28
emidiostani
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
Taranto, Puglia smile
Posted: 2010-06-30 15:38:10
greg

Avatar for greg
Subject: Re: Optimizing ChecksDao classQuote this post in your reply
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 classQuote this post in your reply
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.