- ๐ง๐ทBrazil mabho Rio de Janeiro, RJ
Ok, here is a suggested patch using
IntersectionObserver
. The previous approach was:- Detach the entire permissions table from DOM.
- Manipulate it to create and apply one dummy checkbox per permission, per role.
- Re-insert the entire table back to the original container.
Although detaching/re-inserting is probably an improvement over the previous version, it still causes considerable lag when loading the permissions page in the context of multiple roles and modules, where literally thousands of checkboxes are manipulated by the script.
This new approach I am suggesting is dropping the detach/re-attach method. Instead, the new code will only kick in when necessary by using IntersectionObserver; we will do the bare minimum to make sure the expected results are still delivered; here is an overview of what is being delivered:
- Grab all table rows and find those carrying a checked checkbox in the
Authenticated user
column - Immediately run the code that activates the dummy checkboxes on these rows. We want this process to happen very soon.
- For all the other rows, we have no hurry, as the dummy checkboxes will be activated upon user interaction only. Why block the entire page processing because of these guys? We will attach an IntersectionObserver to each one of these rows, and then process them individually as they become visible on the page.
I ran some local tests with
console.time()
andconsole.timeEnd()
applied to the beginning and end of script and the performance gain was massive. - ๐บ๐ธUnited States jrb Raleigh-Durham Area, NC, USA
I think is actually due to a bug in BigPipe and core ajax.js. I created a separate issue here:
๐ BigPipe error - An error occurred during the execution of the Ajax response: LoadJS Needs reviewThat new issue includes a patch that fixes the bug.
- ๐บ๐ธUnited States jrb Raleigh-Durham Area, NC, USA
For those, having this JavaScript error as mentioned by @tonka67 in #89 and others:
An error occurred during the execution of the Ajax response: LoadJS
I don't think that problem is directly related to this and this issue is closed, so I created a separate issue here:
๐ BigPipe error - An error occurred during the execution of the Ajax response: LoadJS Needs reviewThat new issue includes a patch that fixes the bug.
- ๐ฎ๐ณIndia Balaprasad
Hello, I am also facing same issue. The language switcher block I have added in header section. It shows for anonymous users but not for logged in user.
Getting issue with the big_pipe module.
Other than disabling core big_pipe module.
Could any one help with other solution.Thanks in advance!!
- ๐ณ๐ฑNetherlands MariskaTh
I'm having this problem too. At first, I did not notice that this problem only occurs when one is logged in. That helps, because my users do not log in. Nevertheless, would be great if a solution could be found.
A question: I read above that disabling bigpipe also solve this problem. I have a lightweight website, mostly only text. Would it then be okay to disable bigpipe, or does that lead to other problems?
Best regards,
Mariska - ๐ณ๐ฟNew Zealand quietone New Zealand
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.
- ๐ณ๐ฟNew Zealand quietone New Zealand
The patch here needs to be converted to an MR and allow the tests to run. I am all for tests but what is the test to do here? Is it just to confirm the refresh is done once? That needs clarification.
- ๐ง๐ทBrazil mabho Rio de Janeiro, RJ
The patch on this thread can't be applied anymore because of the changes introduced here #3278415: Remove usages of the JavaScript ES6 build step, the build step itself, and associated dev dependencies โ .
- ๐ซ๐ทFrance mably
We are being hit by this rather annoying bug when using the views_auto_refresh โ module.
Looks like a simple fix, it's surprising that it hasn't been merged yet.
Thanks for the patch!
I get the same problem as #91. I have multiple views in my content area but only the first one is rendered when logged in. When not logged in, they render properly.