Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Big Lists #37

Open
Nexxtron opened this issue Nov 9, 2016 · 5 comments
Open

[Question] Big Lists #37

Nexxtron opened this issue Nov 9, 2016 · 5 comments

Comments

@Nexxtron
Copy link

Nexxtron commented Nov 9, 2016

Hello,
Currently I have a List (as Component). The list can have up to 1000 rows. Each row can have some styles and optionally more components. The row component can be rather heavy (have a lot of content).

{% import Row from "./list/row" %}

<div class="list">
    <div class="table">
    {% for rowIndex, row of rows %}
      <Row id={{id}} rowIndex={{rowIndex}} row={{row}} columns={{columns}} />
    {% endfor %}
    </div>
</div>

Now, if I add one row to the start of the List, Monkberry updates/re-renders all rows and then things get slow... (When all Rows are re-rendered/updated it takes on FF about 600ms)
How could I overcome this problem? With keyed Lists? Is there any update?

Thanks in advance :)

@antonmedv
Copy link
Owner

Hello,

Yes keyed list is solution for your problem. But currently Monkberry does not supports keyed list. I think to add this feature in next Monkberry v5.

@kisenka
Copy link

kisenka commented Nov 10, 2016

@Elfet any ETA of v5? :)

@antonmedv
Copy link
Owner

I wish i have ETA :)

@Nexxtron
Copy link
Author

Is there any workaround/hack to overcome this problem, at the moment? Sth. like pre-fill the "row" array and set all rows to invisible? Then, when I add a row, I toggle the visibility?

@antonmedv
Copy link
Owner

Yes, workaround for this simple: implement manipulating with big rows in vanilla.js. In this case you get get best performance possible, but it of cause require you to write additional code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants