Hello all,
While cleaning (reviewing and rewriting) the code of Wikidata and Wikimedia Commons backend in October 2019, The Wikidata team at WMDE together with WMF worked on reducing the loading time of pages. We managed to reduce the loading time of every Wikidata page by about 0.1-0.2 seconds. This is due to a reduction of the modules (sets of code responsible for a certain function) that need to be loaded every time a page is opened by someone. Instead of 260 modules, which needed to be loaded before, only 85 modules need to be loaded now when the page is called. By doing so, it is easier to load Wikidata pages for people who only have a slow internet connection.
Link to picture on Commons: https://commons.wikimedia.org/wiki/File:Reduced_loading_times_cut.png
Description: Size decrease of the initialization loader on Wikidata pages (see on Grafana https://grafana.wikimedia.org/d/BvWJlaDWk/startup-manifest-size?orgId=1&from=now-6M&to=now&var-wiki=enwiki&var-component=All&var-multiwiki=wikidatawiki&fullscreen&panelId=59 )
Reducing the amount of modules called when loading the page equals a reduction of about 130 GB of network traffic for all users every day, or 47TB per year. The reduction of network traffic translates into a reduction of electricity use, thus, this change is also good for the environment. Additionally, the interdependencies between the modules were reduced from 4MB to 1MB, which improved the loading time per page as well.
Many thanks to everyone involved in this improvement! If you want to get more details about the actions we performed, you can have a look at the Phabricator board https://phabricator.wikimedia.org/project/board/4268/query/all/. If you are developing scripts or tools on top of the Wikidata UI, some documentation will walk you through the architecture of RessourceLoader https://www.mediawiki.org/wiki/ResourceLoader/Architecture, what’s page load performance https://www.mediawiki.org/wiki/Wikimedia_Performance_Team/Page_load_performance and how to create module bundles with ResourceLoader https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader.
For further questions or feedback, feel free to contact us on this page https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team.
Cheers,
Max for the Wikidata team
Well done!
On Tue, Feb 11, 2020 at 11:07 AM Max Klemm max.klemm@wikimedia.de wrote:
Hello all,
While cleaning (reviewing and rewriting) the code of Wikidata and Wikimedia Commons backend in October 2019, The Wikidata team at WMDE together with WMF worked on reducing the loading time of pages. We managed to reduce the loading time of every Wikidata page by about 0.1-0.2 seconds. This is due to a reduction of the modules (sets of code responsible for a certain function) that need to be loaded every time a page is opened by someone. Instead of 260 modules, which needed to be loaded before, only 85 modules need to be loaded now when the page is called. By doing so, it is easier to load Wikidata pages for people who only have a slow internet connection.
Link to picture on Commons: https://commons.wikimedia.org/wiki/File:Reduced_loading_times_cut.png
Description: Size decrease of the initialization loader on Wikidata pages (see on Grafana https://grafana.wikimedia.org/d/BvWJlaDWk/startup-manifest-size?orgId=1&from=now-6M&to=now&var-wiki=enwiki&var-component=All&var-multiwiki=wikidatawiki&fullscreen&panelId=59 )
Reducing the amount of modules called when loading the page equals a reduction of about 130 GB of network traffic for all users every day, or 47TB per year. The reduction of network traffic translates into a reduction of electricity use, thus, this change is also good for the environment. Additionally, the interdependencies between the modules were reduced from 4MB to 1MB, which improved the loading time per page as well.
Many thanks to everyone involved in this improvement! If you want to get more details about the actions we performed, you can have a look at the Phabricator board https://phabricator.wikimedia.org/project/board/4268/query/all/. If you are developing scripts or tools on top of the Wikidata UI, some documentation will walk you through the architecture of RessourceLoader https://www.mediawiki.org/wiki/ResourceLoader/Architecture, what’s page load performance https://www.mediawiki.org/wiki/Wikimedia_Performance_Team/Page_load_performance and how to create module bundles with ResourceLoader https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader.
For further questions or feedback, feel free to contact us on this page https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team.
Cheers,
Max for the Wikidata team
-- Max Klemm Working Student Community Communication for Technical Wishes
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin Phone: +49 (0)30 219 158 26-0https://wikimedia.de
Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision!https://spenden.wikimedia.de
Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Great !
Two small perfectionist question: - is it finished or can we maybe go further? - can it be done/replicated on other Wikimedia projects?
Cheers, ~nicolas
Hey,
On Tue, 11 Feb 2020 at 12:30, Nicolas VIGNERON vigneron.nicolas@gmail.com wrote:
Great !
Two small perfectionist question:
- is it finished or can we maybe go further?
It is finished for now, but we should continue monitoring it so new modules don't accumulate again. In order to keep a low loading time, we should especially be careful about not adding too many gadgets to the projects (prefer individual scripts or external tools), and make sure that the existing or new gadgets are not requesting too many resources.
- can it be done/replicated on other Wikimedia projects?
WMF has been doing it for other projects as well, see this blog post https://phabricator.wikimedia.org/phame/post/view/175/wikipedia_s_javascript_initialisation_on_a_budget/.
Cheers, ~nicolas _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
That's awesome, thanks!
On Tue, Feb 11, 2020 at 3:46 AM Léa Lacroix lea.lacroix@wikimedia.de wrote:
Hey,
On Tue, 11 Feb 2020 at 12:30, Nicolas VIGNERON vigneron.nicolas@gmail.com wrote:
Great !
Two small perfectionist question:
- is it finished or can we maybe go further?
It is finished for now, but we should continue monitoring it so new modules don't accumulate again. In order to keep a low loading time, we should especially be careful about not adding too many gadgets to the projects (prefer individual scripts or external tools), and make sure that the existing or new gadgets are not requesting too many resources.
- can it be done/replicated on other Wikimedia projects?
WMF has been doing it for other projects as well, see this blog post https://phabricator.wikimedia.org/phame/post/view/175/wikipedia_s_javascript_initialisation_on_a_budget/.
Cheers, ~nicolas _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- Léa Lacroix Project Manager Community Communication for Wikidata
Wikimedia Deutschland e.V. Tempelhofer Ufer 23-24 10963 Berlin www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Sounds great, thanks a lot.
Yaroslav
On Tue, Feb 11, 2020 at 6:11 PM Denny Vrandečić vrandecic@gmail.com wrote:
That's awesome, thanks!
On Tue, Feb 11, 2020 at 3:46 AM Léa Lacroix lea.lacroix@wikimedia.de wrote:
Hey,
On Tue, 11 Feb 2020 at 12:30, Nicolas VIGNERON < vigneron.nicolas@gmail.com> wrote:
Great !
Two small perfectionist question:
- is it finished or can we maybe go further?
It is finished for now, but we should continue monitoring it so new modules don't accumulate again. In order to keep a low loading time, we should especially be careful about not adding too many gadgets to the projects (prefer individual scripts or external tools), and make sure that the existing or new gadgets are not requesting too many resources.
- can it be done/replicated on other Wikimedia projects?
WMF has been doing it for other projects as well, see this blog post https://phabricator.wikimedia.org/phame/post/view/175/wikipedia_s_javascript_initialisation_on_a_budget/.
Cheers, ~nicolas _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- Léa Lacroix Project Manager Community Communication for Wikidata
Wikimedia Deutschland e.V. Tempelhofer Ufer 23-24 10963 Berlin www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata