Skip to content
Commit 700a7c23 authored by Carl Schwan's avatar Carl Schwan
Browse files

Speed up fetching of WebDAV folder listing



Before this patch, the WebDAV requests was done once all the scripts are
executed and that the DOMContentLoaded is executed. This is an issue
because it takes a long time for all the scripts to be run (~900ms).

Futhermore, once the request is done the CPU is idle because there is no
script anymore to fetch and it's just waiting for the response.

This patch makes the script do the WebDAV when executing the script
instead of when DOMContentLoaded is executed. This has the advantage
that during the WebDAV requests, the browser is not idle but continue
executing the other scripts (thanks to the async IO).

End result: the file listing is displayed 100ms earlier

This also makes sure that the files_sharing scripts are executed earlier
than the files scripts as they have event listeners on the files apps.

Signed-off-by: default avatarCarl Schwan <carl@carlschwan.eu>
parent fbbbc2ec
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment