anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

Add option to reuse pre-rendered markup & to reuse DOM nodes #423

Open ctizen opened 8 years ago

ctizen commented 8 years ago

Hello,

I've taken 0a's changes from #395 and #396, slightly refactored them to comply with current codebase and added some more things, such as possibility to reuse already created nodes to minimize memory usage. Also relates to #190

I still have a TODO to resolve (see question in test/app/thunk.js), any advice is appreciated. Also I'm not sure if all of these changes should be in the mainline or it's better to make them as a plugin.

Bench for uibench ( https://localvoid.github.io/uibench/ ) may be run with this custom link: https://heilage-nsk.github.io/uibench-deku/ Headless tests are passing, but for some reason Electron fails to start on my system, so I cannot check it :( I'd be glad if someone would try to run tests on Electron and share the results.

anthonyshort commented 8 years ago

Thanks for the PR @heilage-nsk! I'm going to have a read through this soon and give you some feedback.

Chaptykov commented 8 years ago

+1

alexHlebnikov commented 8 years ago

+1

ArtZanko commented 8 years ago

+1

anthonyshort commented 8 years ago

Looks good to me! The pooling seems like it could exist in an another module rather than living inside Deku, but we can move this out at a later stage. Nice work!

For the thunk, having nested thunks with the same path could break anything using the path to store state, so we might need to fix that before we can merge it in.

ctizen commented 8 years ago

@anthonyshort Sorry for it took me so long. I've just pushed a fix for paths in thunks.

todesignandconquer commented 8 years ago

+1

markuplab commented 8 years ago

+1? @anthonyshort maybe merge it?