deephaven / deephaven-core

Deephaven Community Core
Other
254 stars 80 forks source link

Lower latency page loading (ide, iframe) #3827

Open devinrsmith opened 1 year ago

devinrsmith commented 1 year ago

Currently, the jetty server only enables caching of /ide/assets/*, and disables caching on /ide/* and /jsapi/*:

        // For the Web UI, cache everything in the static folder
        // https://create-react-app.dev/docs/production-build/#static-file-caching
        context.addFilter(NoCacheFilter.class, "/ide/*", EnumSet.noneOf(DispatcherType.class));
        context.addFilter(NoCacheFilter.class, "/jsapi/*", EnumSet.noneOf(DispatcherType.class));
        context.addFilter(CacheFilter.class, "/ide/assets/*", EnumSet.noneOf(DispatcherType.class));
        context.addFilter(DropIfModifiedSinceHeader.class, "/*", EnumSet.noneOf(DispatcherType.class));

This can cause excessive bandwidth and loading times, as /jsapi/dh-core.js and /jsapi/dh-internal.js are requested fresh on every page load. Furthermore, nothing under /iframe/ is cached.

devinrsmith commented 1 year ago

There's also good potential to use compression; we might be able to see a 10x ratio on dh-core.js / dh-internal.js.