pgAdmin 4 commit: Optimize Webpack to improve overall performance.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pgAdmin 4 commit: Optimize Webpack to improve overall performance.

Akshay Joshi
Optimize Webpack to improve overall performance.

Changes include:
1) Remove underscore-string and sprintf-js packages as we were using only %s. Instead, added a function to do the same. Also changed gettext to behave like sprintf directly.
2) backgrid.sizeable.columns was not used anywhere, removed. @babel/polyfill is deprecated, replaced it with core-js.
3) Moved few css to make sure they get minified and bundled.
4) Added Flask-Compress to send static files as compressed gzip. This will reduce network traffic and improve initial load time for pgAdmin.
5) Split few JS files to make code reusable.
6) Lazy load few modules like leaflet, wkx is required only if geometry viewer is opened. snapsvg loaded only when explain plan is executed. This will improve sqleditor initial opening time.

Reviewed By: Khushboo Vashi
Fixes #4701

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f16498a8a7b519d8d85c7b60565160f1c2442afa
Author: Aditya Toshniwal <[hidden email]>

Modified Files
--------------
docs/en_US/release_notes_4_14.rst                  |    1 +
libraries.txt                                      |  400 +++---
requirements.txt                                   |    5 +-
web/config.py                                      |   11 +-
web/package.json                                   |   15 +-
web/pgadmin/__init__.py                            |    8 +-
web/pgadmin/about/static/js/about.js               |    6 +-
.../servers/databases/casts/static/js/cast.js      |    4 +-
.../event_triggers/static/js/event_trigger.js      |    4 +-
.../databases/extensions/static/js/extension.js    |    4 +-
.../foreign_servers/static/js/foreign_server.js    |    4 +-
.../user_mappings/static/js/user_mapping.js        |    4 +-
.../static/js/foreign_data_wrapper.js              |    4 +-
.../databases/languages/static/js/language.js      |    4 +-
.../columns/static/js/catalog_object_column.js     |    4 +-
.../catalog_objects/static/js/catalog_object.js    |    4 +-
.../schemas/collations/static/js/collation.js      |    4 +-
.../static/js/domain_constraints.js                |    4 +-
.../fts_dictionaries/static/js/fts_dictionary.js   |    4 +-
.../schemas/functions/static/js/procedure.js       |    4 +-
.../schemas/sequences/static/js/sequence.js        |    4 +-
.../schemas/synonyms/static/js/synonym.js          |    4 +-
.../static/js/compound_trigger.js                  |    4 +-
.../check_constraint/static/js/check_constraint.js |    4 +-
.../index_constraint/static/js/primary_key.js      |    2 +-
.../static/js/unique_constraint.js                 |    2 +-
.../tables/partitions/static/js/partition.js       |   18 +-
.../databases/schemas/tables/static/js/table.js    |    8 +-
.../schemas/tables/triggers/static/js/trigger.js   |    4 +-
.../databases/schemas/types/static/js/type.js      |    8 +-
.../servers/databases/static/js/database.js        |    6 +-
.../pgagent/schedules/static/js/pga_schedule.js    |    4 +-
.../servers/pgagent/static/js/pga_job.js           |    4 +-
.../servers/pgagent/steps/static/js/pga_jobstep.js |   14 +-
.../server_groups/servers/roles/static/js/role.js  |    4 +-
.../server_groups/servers/static/js/server.js      |   21 +-
.../servers/tablespaces/static/js/tablespace.js    |    4 +-
web/pgadmin/browser/static/js/browser.js           |    6 +-
web/pgadmin/browser/static/js/collection.js        |   11 +-
web/pgadmin/browser/static/js/datamodel.js         |   12 +-
web/pgadmin/browser/static/js/menu.js              |    6 +-
web/pgadmin/browser/static/js/node.js              |   41 +-
web/pgadmin/browser/static/scss/_browser.scss      |    4 +-
web/pgadmin/browser/templates/browser/index.html   |    2 +-
web/pgadmin/dashboard/static/js/charting.js        |   15 +-
web/pgadmin/misc/bgprocess/static/js/bgprocess.js  |    6 +-
.../misc/dependencies/static/js/dependencies.js    |   10 +-
.../misc/dependents/static/js/dependents.js        |   10 +-
web/pgadmin/misc/file_manager/static/js/utility.js |    8 +-
web/pgadmin/misc/sql/static/js/sql.js              |    9 +-
web/pgadmin/misc/static/explain/js/explain.js      |  168 +--
web/pgadmin/misc/static/explain/js/image_maper.js  |    5 +-
web/pgadmin/misc/static/explain/scss/_explain.scss |    2 +-
.../misc/statistics/static/js/statistics.js        |    9 +-
web/pgadmin/static/bundle/app.js                   |    4 +-
web/pgadmin/static/bundle/slickgrid.js             |    1 -
web/pgadmin/static/css/alertify.noanimation.css    |   41 -
web/pgadmin/static/css/pgadmin.css                 |   36 -
web/pgadmin/static/css/style.css                   |    3 +-
web/pgadmin/static/js/alertify/dialog.js           |    2 +-
web/pgadmin/static/js/backform.pgadmin.js          |    4 +-
web/pgadmin/static/js/check_node_visibility.js     |    6 +-
web/pgadmin/static/js/gettext.js                   |   45 +-
web/pgadmin/static/js/keyboard_shortcuts.js        |   10 +-
web/pgadmin/static/js/modify_animation.js          |   12 +-
.../static/js/sqleditor/call_render_after_poll.js  |    2 +-
web/pgadmin/static/js/sqleditor/geometry_viewer.js |   24 +-
web/pgadmin/static/js/utils.js                     |   28 +
web/pgadmin/static/scss/_alertify.overrides.scss   |   36 +
web/pgadmin/static/scss/_codemirror.overrides.scss |    2 +-
web/pgadmin/static/scss/_pgadmin.style.scss        |   15 -
web/pgadmin/static/vendor/backgrid/backgrid.css    |    6 +-
web/pgadmin/static/vendor/backgrid/backgrid.js     |  200 ++-
web/pgadmin/templates/base.html                    |   15 +-
web/pgadmin/tools/backup/static/js/backup.js       |    4 +-
.../tools/datagrid/templates/datagrid/index.html   |    2 +-
web/pgadmin/tools/debugger/static/js/debugger.js   |   10 +-
.../tools/debugger/templates/debugger/direct.html  |    2 +-
.../tools/import_export/static/js/import_export.js |   11 +-
.../tools/maintenance/static/js/maintenance.js     |    6 +-
web/pgadmin/tools/restore/static/js/restore.js     |    4 +-
.../tools/restore/static/js/restore_dialog.js      |    2 +-
web/pgadmin/tools/sqleditor/static/js/sqleditor.js |   29 +-
.../user_management/static/js/user_management.js   |   52 +-
.../javascript/alerts/alertify_wrapper_spec.js     |    4 +-
.../javascript/browser/modify_animation_spec.js    |    8 +-
.../javascript/dashboard/charting_spec.js          |    4 -
.../geometry_viewer/geometry_viewer_spec.js        |   19 +-
web/regression/javascript/gettext_spec.js          |   15 +-
web/regression/javascript/pgadmin_utils_spec.js    |   28 +-
.../javascript/sqleditor/execute_query_spec.js     |   36 +-
.../table/enable_disable_triggers_spec.js          |    6 +-
web/regression/javascript/tree/tree_fake.js        |    2 +-
web/webpack.config.js                              |   96 +-
web/webpack.shim.js                                |   36 +-
web/webpack.test.config.js                         |    5 +-
web/yarn.lock                                      | 1437 ++++++++++++--------
97 files changed, 1894 insertions(+), 1353 deletions(-)