Sei sulla pagina 1di 13

Improve performance of

Ajax Web applications


COMP6008: Research Methods in Computing

Stephan Scheuermann, 23753021


7 December 2009
Overview
• Background information
– Ajax Web applications
– Ajax Example
• Improve Ajax performance
– Prefetch data
– Prediction algorithm
– Implementation
• Summary

2
Background information
• Traditional Web applications
– Completely run on a Web server (PHP, ASP.NET etc.)
– Most user actions trigger an HTTP request
– Browser only displays processed HTML

3
Background information
• Ajax web applications use well known techniques
– JavaScript, XML, HTML, DOM
• A great deal of interaction is shifted to the browser
– Only required data is requested asynchronously
– Ajax framework updates HTML DOM
• Dramatically reduced bandwidth usage and response time

4
Background information
• Example: Sending a message on facebook

5
Improve Ajax performance
• Prefetch data
• Required data is downloaded before it is needed

• Fetched data is stored in the browser cache


• Algorithm to predict the behaviour of the user decides
which data has to be downloaded

6
Improve Ajax performance
• Prediction algorithm relies on the analysis of user behaviour
– User profile
e.g., after each login the message center is opened
– Current activity
e.g., user is hovering the mouse pointer over a button

• Prediction could be improved if several criteria are combined with each


other

7
Improve Ajax performance
• Implementation
– Two versions (with/without prefetching) are compared
– Prediction only takes user’s current action into account
– Data is fetched asynchronously when selecting an item
in a drop-down list or hovering the mouse over links
– Test results prove response time is improved by 64,5%!

8
Summary
• Average response time is notably improved
– Good prediction algorithms are important
• Additional resources (JavaScript libraries) are required and
have to be downloaded while loading the website
• Prefetching could increase bandwidth usage
– Some resources are downloaded but never used

9
Sources
• Andi Ahmad Dahlan & Toshikazu Nishimura,
Implementation of asynchronous predictive fetch to
improve the performance of Ajax-enabled web
applications,
International Conference on Information Integration and
web-based Applications and Services (iiWAS 2008)

10
Many thanks!
Any questions?
BACKUP
Measured delay time
Duration to click after hovering an item
Very fast Fast Normal
(msec) (msec) (msec)
Textual link 125-500 250-850 >850

Button 125-250 250-750 >850

Drop-down list 350-450 450-1000 >1000

13

Potrebbero piacerti anche