Allow disabling of readmore-js on docker page.


Recommended Posts

readmore-js is used on the docker tab to allow collapsing of Port Mapping and Volume Mapping columns.

 

I have 40 docker containers of which 8 have enough port mappings and 15 have enough volume mappings to require the readmore-js-toggle chevron-down to show up.

 

(I believe) If the dom resizes in any way then readmore-js's resizeBoxes function is called which causes an immense amount of lag that progressively gets worse the more times the dom size changes.

 

The first time I resize the dom the lag is only about 3-4 seconds. The second time is 11 seconds, the 3rd time is 21 seconds. Looking at firefoxs' profiling recording tool I'm unsure if the running samples means how many times this function was called, but for a simple resize of the browser (un-maximize and then maximized) it says samples for resizeBoxes is 21,856 having spent 21,906MS traced running time. 66% of the time is spent resizing boxes.

 

It isn't just resizing of the dom either, if i leave the docker tab open and i'm focused elsewhere or I've left my computer for a bit, it'll crash the browser. On android if i try to zoom on my phone or tablet, it'll also lag horribly.

 

My main profiling checking has been on Linux Mint with Firefox but this has been happening for a long time over various different machines including Windows 7 Firefox and Chrome, Windows 10 Firefox and Chrome, Linux Mint 20.3 Firefox, Brave, and Chromium, Android phone and tablet both chrome and firefox. The androids get so bad it usually requires i kill the browser.

 

Having now found the profiling tool and realizing its attempting to resize these boxes, I used the following js to delete the readmore-js boxes and everything on the page runs so much smoother.

document.querySelectorAll('.readmore-js-section').forEach(e => e.remove());

 

Edited by iarp
Link to comment

Ok so this is curious, I was looking up grafana and unraid videos on youtube and while watching the video below I noticed that none of his ports and volume mappings are collapsing. The video is only a little over a year old at this point and I've been on the most recent versions as they released.

 

Now I'm wondering if there is an option buried somewhere that disables the collapsing system.

 

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.