plotly / plotly/plotly.js

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

Aperta
#8,048 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

chore P3 plotly-internal size: 5 task
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da CUSTOM_BUNDLE.md e dalla discussione chiusa #5535 per comprendere l'attuale vincolo del bundling delle tracce scatter. Verifica se i bundle personalizzati possono escludere scatter senza compromettere scattergl, scatterternary o altre tracce dipendenti. Il lavoro è completato quando scatter non richiesto viene escluso in modo sicuro oppure la documentazione spiega chiaramente perché deve rimanere incluso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
build-system, data-visualization
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Attiva
Chiarezza
Da chiarire
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.