freiksenet / react-calendar

A modular toolkit to build calendar-related things in React
http://freiksenet.github.io/react-calendar/
MIT License
249 stars 46 forks source link

Performance #20

Closed ericwooley closed 8 years ago

ericwooley commented 9 years ago

We wanted to use this in a project, however the render time is too long (noticeable lag). There is a lot of loops and cloning moment going on. It might be worth looking into reducing the render times.

freiksenet commented 9 years ago

Agreed.

One 'low-hanging fruit' could be replacing the keys that I (wrongly) assigned to unique ids to simple positional ones, that would reduce re-render time, I think.

lolJS commented 8 years ago

@ericwooley could you check out the latest master branch and let me know if it's solved your performance issues?

EDIT: This intrigued me so I dug into it a little bit. With the new API, initial rendering takes about 500ms (for the new full year example). The next render when paging takes about 400ms and the next render after that less than 200ms! V8 is doing some voodoo here. Overall though, not bad, considering how many loops are actually being done to render a full year.

screen shot 2016-03-15 at 8 06 43 pm
lolJS commented 8 years ago

Also closing this issue! :alien:

ericwooley commented 8 years ago

Sorry just saw this.

Unfortunately i don't have the source code anymore to check how it renders. Glad you got it lowered though!