-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving MapStore Performances #4675
Comments
A quick report on reducing initial js loading. Playing with dynamic splitting of pages and plugins this is what we can get. This is the current loading of js files for the homepage. This is the after code splitting. Instead of 2.5Mb we download about 782kb. Moreover the code that is not red boxed can be removed from initial loading, because it's not needed by the homepage. So 782kb could be the complete payload for js code. The experiment code is here: https://github.com/mbarto/MapStore2/tree/split_pages |
Some stats about home page loading payloads:
|
Thank you @mbarto, let's discuss this in a meeting. |
As a first step, we agreed to move on with the following:
|
Just subscribing here as we're very interested in seeing improvements on this issue and #4297 - let me know if there's anything you need help with |
Added an improvement to increase general rendering performances, see #5133 |
@tdipisa Updete 01 September 2022
ogc-schemas is still inside the source code but is not imported in the main bundle, we should remove these library anyway if possible. We analyzed some dependencies and removed from the main bundle the one related to specific components, these library will be loaded only when the related component is loaded (see #8535).
We improved the mapping libraries loading so now they should be loaded once the map type match the name of the library and removed also the leaflet cdn in the html head. There are still some issue to be investigated:
The modularization of plugins introduced the lazy loading of plugins (see #8423). We have still a list of static plugins because of issue related of the app lifecycle, these are the plugin still static that could be additionally be transformed in dynamic:
We did some tests but at this time the modularization of these plugins was not improving much the initial loading (proof of concept here #8501). Anyway we could take this into account for future improvements.
Some improvement has been included with the modularization reducing the number plugin in the homepage.
We did not worked on this yet. Is this still relevant? |
The following are next steps to be evaluated and possibly implemented for 2024.02.00 (@allyoucanmap)
|
* Update Changelog for version 2024.02.00 (geosolutions-it#10602) Co-authored-by: github-actions <github-actions@github.com> * Bump commons-io:commons-io from 2.7 to 2.14.0 (geosolutions-it#10593) * Removed react-confirm-button unused dependency (geosolutions-it#10495) * Update release_steps.md (geosolutions-it#10568) * Remove istambul loader (geosolutions-it#10491) * Attempt to remove instambul loader * removed also package dependency * Apply suggestions from code review clean * Remove jsonpath (geosolutions-it#10494) jsonpath is not needed. It is a dependency of geosolutions-it/patcher actually. Having this dependency here is only confusing for dependency analyisis * Fix geosolutions-it#10595 add missing 'FORMAT' parameter to WMTS GetFeatureInfo requests (geosolutions-it#10596) * add missing 'FORMAT' parameter to WMTS GetFeatureInfo requests this is required by the WMTS spec to be the same format as would be used for a GetTile request, and this allows GFI requests to succeed on https://data.geopf.fr/wmts. * fix mapinfo wmts utils test * Fix geosolutions-it#10505 Allow to specify use of proxy or cors at layer level (geosolutions-it#10526) * fix: remove ui element for force proxy and Allow not secure layers * fix: ajax logic changed, autoDetectCORS is set to true by default * new central CORS util file created and used in ajax * checking CORS before adding in common layer file * null check on getProxyUrl * updated individual layer considring to use proxy if needed * avoid proxy cache to update if response is not okey * enable user to add http url, show warning instead of error, warning text updated * test cases updated * fix: resolve conflicts with url check * fixed the failed test * review cesium layers * include add method in model layer * improve http check for openlayers wms layer * fix tests --------- Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com> * Update openId.md (geosolutions-it#10610) * Bump spring-security version to 5.7.12 (fixes geosolutions-it#10611) (geosolutions-it#10612) somehow something in the build already drags this version, and we end up with two conflicting versions of spring-security in the war which results in at least failure to authenticate with basic auth. * Visibility limits - The resolution option is not retained as Limits type geosolutions-it#10391 (geosolutions-it#10598) * Add lib check release step (geosolutions-it#10614) * geosolutions-it#4675 Remove unused code (geosolutions-it#10442) * geosolutions-it#4675 Remove unused code * remove additional code from review * fix tests folder * remove additional unused files * geosolutions-it#10545: Option to disable identify popup in case of no results (geosolutions-it#10557) * geosolutions-it#10545: Option to disable identify popup in case of no results Description: - handle adding an option called 'hidePopupIfNoResults' to hide the identify popup - add unit tests - add jsdoc * geosolutions-it#10545: Option to disable identify popup in case of no results Description: - revert changes in popupSupport files for ol and leaflet + related tests files - handle hide popup for map viewer with css for openlayers and leaflet approach - add unit tests - edit map-popup.less file to handle hide the popup * geosolutions-it#10545: revert unnecessary changes * Fix geosolutions-it#10615 removed eval from marker utils (geosolutions-it#10616) * geosolutions-it#10545: remove marker in case no results + hover identify mode active and hideEmptyPopupOption with true (geosolutions-it#10619) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com> Co-authored-by: Landry Breuil <landryb@users.noreply.github.com> Co-authored-by: RowHeat <40065760+rowheat02@users.noreply.github.com> Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com> Co-authored-by: mahmoud adel <58145645+mahmoudadel54@users.noreply.github.com> Co-authored-by: Matteo V. <matteo.velludini@geosolutionsgroup.com>
Description
MapStore need to be improved in order to optimize some loading performances and functional behaviors.
We should take into account PageSpeed Insights hints to optimize performance and verify at the end the effective improvement. The list below comes from a preliminary analysis of PageSpeed Insights and this Epic collects the main involved points of interest:
MS bundle: the bundle of MS need to be reduced, the issue Investigated on bundle sizes( too high) and memory usage during build #4297 provides a recent reports of currently used libraries. Action here are:
ogc-schemas: GetCapabilites parsing error for inspire_vs:ExtendedCapabilities #6489 is the biggest library (4.21 MB (11.8%)) and it is currently used mainly for some specific purposes like CSW requests and parsing of CSW results. It would be useful to remove this dependency by replacing it with a proprietary solution in MS (estimate for this are ~5/8 pts). This library, together with pdfjs and shpjs anyway is loaded dynamically, therefore should not affect the initial load of the bundle. We have to verify if it is imported somewhere else in the code.
Review of dependencies: the whole list of dependencies need to be analized to check if something can be excluded (clean up of unused/old dependencies).
Mapping Libraries: by default MS uses Leaflet for mobile and OL for desktop (Cesium is an option). Mapping libraries should be loaded only when needed depending on the used device. This means that we can avoid loading OL in Mobile devices and Leaflet in Desktop if not specifically configured. At the same time Cesium JS should not be loaded if the plugin is not enabled in configuration. This point also involves the MS bundle, because Investigated on bundle sizes( too high) and memory usage during build #4297 reports also part of the bundle that currently include some OL and Leaflet scripts (is the report considering dynamic dependencies?). We should split the bundle also per mapping libraries if needed.
Other dependencies loading: a lazy loading of scripts should be implemented to load only needed dependencies related to the application context in use (home/viewer/dashboard/stories). This means to properly split the bundle according to required functional behaviors. For example I don't need to load viewer scripts if I'm loading the home page.
Home Page Loading: the loading of the MS's landing page can be improved also in other terms. Currently all first pages of resource categories (Maps, Dashboards, Stories) are loaded at the same time: by default only the list of Maps should be retrieved from the backend and the other should be loaded only if visualized.
CDN: at the release we can evaluate to speed-up script loading by deploying and getting the new release bundles from a CDN.
What kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
Consider that MS already implements some lazy loading of scripts; therefore existing mechanisms, currently used for specific piece of the framework, can be extend to the entire application.
For each of the above point we can create a separate issue to connect to this epic.
Tasks
The text was updated successfully, but these errors were encountered: