Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
React optimize render for large object of array

I have a large list of array that has about 10,000 lists and I want to minimize the rendering of object to the current list.

There are several solutions that I have found like react-window or react-virtualized to render only the visible components but it does not seem to suit for my current needs.

These 10,000 items will propagate the certain events to the upper components for this I have tried context but it seems to rerender every children even if one of them triggers the function this has lead to memoization hell. Every child and every components has been used unnecessary memoization.

I have simplified the array of object to be in the following format with key and arrays for quick processing

  var data = {
    key: [{},{},{}],
    key2: [{},{}],
    ...
    ...
    ..n
  }

The problem right now is react takes about a second to diff the components and this makes the whole app slow. If I go to profiler I see that react takes about 0.1ms for a components in the array this comes out to be 0.1 * 10000 ms which is way too large diffing time. I would like to memoize the components so when even if I add or update the objects inside the object it diffs only that components and does not rediff every component.

eg. Data manipulation equivalent in js
// Suppose only first object's title is changed and updated to state
data[key][0].title = 'asd' 

This quickly adds up when the individual component will have it's own state and further child component and so on. I would like to have a efficient solution if possible for this.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!