Opened 16 years ago
Closed 16 years ago
#2035 closed enhancement (fixed)
[PATCH] Speed up MOTD loading
Reported by: | xeen | Owned by: | framm |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
The attached patch simplifies MOTD loading by using trac's "download as plain text". This allows for shorter regular expression and also reduces bandwidth use as the HTML stuff is not transferred 8 times.
The time spent loading MOTD went down from ~1800 ms to ~1200 ms for me using the German locale but will probably yield even better results for locales that don't have a translated MOTD. The old code downloads the localized version /regardless/ if it's actually been linked from the wiki (so, for each entry an additional, superfluous request is made).
Further improvements can be made by joining all MOTDs into one (i.e. MessageOfTheDay, De:MessageOfTheDay and so on) in order to shorten round trip times. Downloading is not parallelized; thus with an average ping of 50 ms, there's 400 ms of waiting time. Doing so however would make it impossible to spread news to /all/ locales without having to edit /all/ wiki pages (which may be annoying if the translators are on vacation or similar…).
Also consider committing #1910 – especially for advanced users it would speed up JOSM loading by quite a bit.
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | ImproveMOTDLoading.patch added |
---|
comment:1 by , 16 years ago
It may be worthwhile to note that the current implementation does not parse links for the MOTDs (only for the large "description" part, but that should be moved into JOSM anyway). If link parsing is wanted, I can update the patch.
Improves loading the MOTD by using trac's "download as plain text"