BlueBaseJS / BlueBaseJS/core

Component Memoization Support

Offen
#9 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
3
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Requirements

To improve the performance of BlueRain projects, we need to figure out a way to add component memoization. This means for some components if they are passes same props, again and we expect the same output every time, we don't need to process the render again. We instead return a previous render result, that was cached during the first render.

## Approach

The simplest solution at this time seems to be as follows:
- Add a cache or memoize property for each component in registry.
- During component resolution, for every component that has cache (or memoize) property set to ture, just wrap the component in an hoc from one a memoize library (e.g. [moize](https://github.com/planttheidea/moize)

## Not Doing

- Implementing custom memoization logic

## Possible Memoize libraries

- [moize](https://github.com/planttheidea/moize)

## Useful Links

- https://medium.com/@planttheidea/memoize-react-components-33377d7ebb6c

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit, die Komponentenregistrierung und den Pfad zur Komponentenauflösung im TypeScript-Code zu finden, und bewerte dann das vorgeschlagene Registry-Flag und den externen Memoization-Wrapper. Als abgeschlossen gilt die Arbeit, wenn der gewählte Ansatz memoized Komponenten ohne benutzerdefinierte Memoization-Logik unterstützt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
performance
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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