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.

Row node re-use and max clone count

See original GitHub issue

Just wanted to ask if there are any objections to these ways of doing the rendering. I think Mikado opened the door on the first one, unless I’m misunderstanding the code.

  1. The first idea is to not diff any rows at all but loop over the current rows in the table in the DOM and update the dynamic data (not creating new row nodes), if the list gets bigger create new rows and fill it with the data, if it gets smaller discard some rows. This is quite easy to do when you know the “path” to the dynamic parts of the row template. It’s more like overwriting than diffing.

  2. With the first concept in mind are there any limitations on how many rows one can clone (with cloneNode)? I’m not fully sure this would improve performance but what if one keeps 10 or 100 rows in memory and instead of clone 1 by 1, clone 10 or 100 a time to get to the end count of 1000 and 10000. Again with the dynamic path the template holes can filled after.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
krausestcommented, Sep 21, 2019

If more frameworks go that way we might need filterable flags whether a framework is data-driven and whether it’s reactive to changes… Mikado is neither. It’s as explicit as the vanillajs version. (From a developer’s perspective I’d prefer a reactive data driven framework for almost all non trivial applications, but for the rest something like mikado might be nicer than vanillajs.)

0reactions
luwescommented, Nov 10, 2019

🤦‍♂ my bad, those are indeed different structures I was comparing.

makes sense, yea it’s probably not worth the added complexity then.

it’s fun experimenting, it seems kind of counter intuitive too when we see how much gains the one row clone gives.

here is the on the fly cache experiment I created https://github.com/luwes/sinuous/commit/7156ede3fbec759f86bf8ab8e144c2b05e6d5407

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clone is slow when repo contains a lot of files #793 - GitHub
I have the same problem. Since using the current package, the code gets significantly slower than the git command. All reactions.
Read more >
Optimize GitLab for large repositories
Specifies a custom /builds directory on disk where all clones are stored. We host mount the /builds directory to make it reusable between...
Read more >
All RailClone's Operators Explained in 15 Minutes - YouTube
Getting Started with RailClone ... in less than 15 minutes so that you can start experimenting with these powerful nodes right away!
Read more >
Tutorial - All RailClone's Operators Explained - iToo Software
Segment counts the number of segments placed on the path, before the current position. Returns true or false if the values entered in...
Read more >
Cleaning up copy–paste clones with interactive merging
We propose a novel solution to the reuse discrepancy that offers all the speed and simplicity of copy–paste–modify together with the design ...
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