Aggregate 'only ancestor' libraries in their own groups

Created on 5 January 2025, 3 months ago

Problem/Motivation

Follow-up from 📌 By default, don't aggregate jquery.js Active .

One possible way to make the jquery.min.js handling generic.

the core/jquery library doesn't depend on anything, but it's depended upon by lots of libraries.

We can call that an 'ancestor-only' library, maybe there's a better term.

We can build a list of all libraries on a site that are depended upon by at least one library and don't have any dependencies themselves, can probably happen in LibraryDependencyResolver.

These libraries, we can then put into their own group in JsCollectionGrouper.

Anything that has neither dependencies nor dependees, or declares a dependency, gets handled the way it currently does.

Will need manual testing + performance tests updated - even if this works, it might not lead to a desirable result.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

asset library system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @catch
  • 🇬🇧United Kingdom catch

    Put up a proof of concept but it creates far too many aggregates, libraries that are 'only ancestors' aren't grouped together in the library list so it keeps creating a new aggregate each time it discovers a new 'dependency type'.

  • Merge request !10818Resolve #3497475 "Aggregate only ancestor" → (Open) created by catch
  • 🇬🇧United Kingdom catch

    Pushed another proof of concept that results in four aggregates on Umami pages.

    Splits into:

    libraries that are only dependencies of other libraries

    libraries that are both dependencies and depended upon.

    libraries that are neither dependencies nor dependended upon.

    This results in four aggregates on each Umami page - on at least one page, all the aggregates changed so it is not working great.

    I think this might be a dead-end and we should concentrate on handling this problem via the placeholdering issues instead (and 📌 By default, don't aggregate jquery.js Active as a quick fix.

  • Status changed to Closed: won't fix 30 days ago
  • 🇬🇧United Kingdom catch

    Giving up on this one.

Production build 0.71.5 2024