Open robyngit opened 5 months ago
➡️ The performance implications of using config/config.js vs /js/themes/arctic/config.js are negligible. ⬅️
/js/themes/arctic/config.js
and using /config/config.js
to point to the arctic themeindex.html:
var appConfigPath = "/config/config.js";
config/config.js:
MetacatUI.AppConfig = {
root: "/",
theme: "arctic"
};
First Contentful Paint: 0.2 s Total Blocking Time: 24,280 ms Largest Contentful Paint: 5.2 s
First Contentful Paint 0.2 s Total Blocking Time 26,450 ms Largest Contentful Paint 5.2 s
index.html:
var appConfigPath = "/js/themes/arctic/config.js";
no loading of config/config.js
First Contentful Paint: 0.2 s Total Blocking Time: 23,860 ms Largest Contentful Paint: 5.8 s
First Contentful Paint 0.2 s Total Blocking Time 18,270 ms Largest Contentful Paint 3.7 s
For deployments of MetacatUI using Helm on Kubernetes, we propose standardizing the location of the
config.js
file toconfig/config.js
. Currently, in some deployments, we are manually editing theindex.html
to adjust the path defined byvar appConfigPath = "/config/config.js";
to point to a theme-specific configuration atvar appConfigPath = "/js/themes/THEMENAME/config.js";
.This adjustment is necessary for deployments utilizing a theme config file which contains all base theme configurations, in contrast to the usual
config/config.js
that contains overrides. We hypothesize that requiring metacatui to load two separate config files might increase loading times, particularly first contentful paint time. This theory needs empirical verification.This issue will serve as a platform to share insights on the performance implications of this configuration setup.
See also: #2027