question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I have 30,000 rect to draw, and the page is too slow. can anyone help me?

See original GitHub issue
landData.length = 30000

<Group>
            {landData.length > 0 ? (
              landData.map((rectInfo: RectInfo) => {
                return <ColorRect key={`${rectInfo.key}`} rectInfo={rectInfo} onItemClick={onLandClick} />
              })
            ) : (
              <></>
            )}
            {mark}
</Group>

and about {mark}, first click i add Rect to mark, if i click it again, i have to remove it from group, can i implement it?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lavrtoncommented, Nov 19, 2021

I am not certain if it will be simply possible to handle that much. Probably you should try direct 2d canvas API and just draw with it, without react and Konva abstractions.

0reactions
weixuefengcommented, Jan 6, 2022

@weixuefeng how did you use react-virtualized to solve this?

yes. you can try it. https://github.com/bvaughn/react-virtualized or https://github.com/bvaughn/react-window

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slow drawing in SOLIDWORKS? Here are 12 possible reasons
PC power settings, drivers, imported features and corrupt templates make a drawing slow. We share how to measure and improve performance.
Read more >
I process things very slowly. I am a slow reader. I have ... - Quora
Slowness is a result, not the problem. Problem possibly is imbalance of a kind. Slowness is like knife dullness. When knife is dull,...
Read more >
STAAR Grade 3 Reading - Texas Education Agency
A porcupine has. 30,000 or more of them! 2 You might have seen cartoons showing porcupines that could “shoot” their quills. Real porcupines...
Read more >
Any way to speed up Python and Pygame? - Stack Overflow
So pre-drawing fixed images onto surfaces (outside the main game loop), then blitting the surface to the main screen will be more efficient....
Read more >
Problem Solving and Estimating - OpenTextBookStore
In real life, problem solving requires identifying an appropriate formula or procedure, and determining what information you will need (and won't need) to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found