BlueBaseJS / BlueBaseJS/core

Component Memoization Support

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## 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

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the component registry and component-resolution path in the TypeScript code, then assess the proposed registry flag and external memoization wrapper. Done means the selected approach supports memoized components without custom memoization logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.