plotly / plotly/plotly.js

[CHORE]: remove `scatter` trace from custom bundle

Offen
#8,048 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

chore P3 plotly-internal size: 5 task
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

Quoted from https://github.com/plotly/plotly.js/blob/main/CUSTOM_BUNDLE.md:

Please note that the scatter trace is currently included in all bundles and cannot be removed. This behaviour may change in the future, so we recommend that you explicitly include scatter anyway if you need it in your bundle.

There was previously an attempt to make scatter optional in #5535, but that PR was closed without being merged.

Since plotly.js is relatively large even when using a custom bundle, being able to exclude unused traces such as scatter would help further reduce the bundle size.

I'm not sure how much bundle size reduction this would result in, since scattergl, scatterternary and some other traces reuse parts of the scatter implementation. Still, it seems useful for custom bundles to avoid including trace modules that are not explicitly requested where possible.

Would it be worth to re-consider this optimization?

If scatter still needs to be included for architectural reasons, it may be worth updating the documentation? Since the PR is closed.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit CUSTOM_BUNDLE.md und der geschlossenen Diskussion #5535, um die aktuelle Einschränkung beim Bundling von scatter-Traces zu verstehen. Prüfe, ob benutzerdefinierte Bundles scatter ausschließen können, ohne scattergl, scatterternary oder andere abhängige Traces zu beeinträchtigen. Die Aufgabe ist erledigt, wenn entweder nicht angefordertes scatter sicher ausgeschlossen wird oder die Dokumentation klar erklärt, warum es weiterhin enthalten sein muss.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
build-system, data-visualization
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Aktiv
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.