googlearchive / paper-menu

A Material Design menu
https://www.webcomponents.org/element/PolymerElements/paper-menu
27 stars 48 forks source link

Lazy rendering paper-submenu #106

Open NamTThai opened 7 years ago

NamTThai commented 7 years ago

Description

I have a paper-menu with many paper-submenus, depth=3. Imagine a directory with 2 layers of subdirectories. Each menu only has 10-15 submenus, each depth 3 submenu only has 25-50 items. However, the total grows fast. On an instance which I have 16,000 items, the paper-menu takes 10 seconds to render on screen. It is generated by dom-repeat.

Expected outcome

Lazy render :D/? Something similar to what iron-list do, which only render items visible in viewport. The client only need to see items in depth 1 submenu at first. The rest can be rendered gradually.

Actual outcome

The entire menu takes 10 seconds to render on screen