mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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
This commit is contained in:
committed by
Akshay Joshi
parent
e5638b520d
commit
f16498a8a7
@@ -180,10 +180,13 @@ PROXY_X_PREFIX_COUNT = 0
|
||||
# longer part of the main configuration, but are stored in the
|
||||
# configuration databases 'keys' table and are auto-generated.
|
||||
|
||||
# Should HTML be minified on the fly when not in debug mode?
|
||||
# NOTE: The HTMLMIN module doesn't work with Python 2.6, so this option
|
||||
# has no effect on <= Python 2.7.
|
||||
MINIFY_PAGE = True
|
||||
# COMPRESSION
|
||||
COMPRESS_MIMETYPES = [
|
||||
'text/html', 'text/css', 'text/xml', 'application/json',
|
||||
'application/javascript'
|
||||
]
|
||||
COMPRESS_LEVEL = 9
|
||||
COMPRESS_MIN_SIZE = 500
|
||||
|
||||
# Set the cache control max age for static files in flask to 1 year
|
||||
SEND_FILE_MAX_AGE_DEFAULT = 31556952
|
||||
|
||||
Reference in New Issue
Block a user