Code Monkey home page Code Monkey logo

Comments (4)

cconard96 avatar cconard96 commented on July 28, 2024

A lot of unneeded scripts are loaded because there is no sector > item > option menu difference between the search and form pages. Unless in debug mode though, the impact isn't that big because they will be cached by the browser.

For me, the computer search page loads 14.2MB of resources and only 422kb actually get transferred when in production env and with an updated DB. The worst offender is the locale JSON data which Chrome isn't using from the cache for some reason (not expired and the same URL is requested each time) at 371kb.

from glpi.

AdrienClairembault avatar AdrienClairembault commented on July 28, 2024

Is it really worth it to split libs loading as it is cached after the first load ?
This behavior lead to bugs many time because we forgot to load a library for a given page.

from glpi.

cconard96 avatar cconard96 commented on July 28, 2024

I think keeping it split is a good idea. Maybe not the way we are doing it now with the menu layout determining what gets loaded and not with as many script imports for a single feature.
Maybe something better can be done using webpack.
We really need to modernize our JS code in general.

from glpi.

cedric-anne avatar cedric-anne commented on July 28, 2024

I already have in mind a solution to be able to load modules only when it is necessary, and to also be compatible with CSP (= no inline JS code). I already implemented it on some projects, and it worked well. Anyway, changing this part is too late for GLPI 11.0, it can only be done later.

For GLPI 11.0, we should focus only on what could be considered as a regression, i.e. libs that were not loaded in the same context in GLPI 10.0 and that are really heavy.

from glpi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.