krane icon indicating copy to clipboard operation
krane copied to clipboard

Improve faceted RBAC view performance

Open marcinc opened this issue 4 years ago • 3 comments

Complex RBAC structure can sometimes generate significant amount of data and lead to unresponsive faceted tree view which renders it effectively unusable.

Proposed improvements:

  1. Reduce facets (entry points) to the RBAC tree view.
  2. Make the tree structure leaner.
  3. Consider a different visualisation solution / library.

marcinc avatar Jun 02 '20 09:06 marcinc

Not only that, it looks as if it's non-functional at the moment. In the JavaScript console I'm seeing the following warnings.

jquery.js:4050 jQuery.Deferred exception: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded
    at fire (http://localhost:8000/vendor/jquery/jquery.js:3500:31)
    at Object.fireWith [as resolveWith] (http://localhost:8000/vendor/jquery/jquery.js:3630:7)
    at http://localhost:8000/vendor/jquery/jquery.js:4013:15
    at fire (http://localhost:8000/vendor/jquery/jquery.js:3500:31)
    at Object.add [as done] (http://localhost:8000/vendor/jquery/jquery.js:3559:7)
    at adoptValue (http://localhost:8000/vendor/jquery/jquery.js:3666:25)
    at Tree.when (http://localhost:8000/vendor/jquery/jquery.js:4033:4)
    at Tree._setInitialStates (http://localhost:8000/vendor/bootstrap-treeview/bootstrap-treeview.js:369:17)
    at Tree.<anonymous> (http://localhost:8000/vendor/bootstrap-treeview/bootstrap-treeview.js:206:17)
    at proxy (http://localhost:8000/vendor/jquery/jquery.js:10780:13)
jQuery.Deferred exception: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded
    at fire (http://localhost:8000/vendor/jquery/jquery.js:3500:31)
    at Object.fireWith [as resolveWith] (http://localhost:8000/vendor/jquery/jquery.js:3630:7)
    at http://localhost:8000/vendor/jquery/jquery.js:4013:15
    at fire (http://localhost:8000/vendor/jquery/jquery.js:3500:31)
    at Object.add [as done] (http://localhost:8000/vendor/jquery/jquery.js:3559:7)
    at adoptValue (http://localhost:8000/vendor/jquery/jquery.js:3666:25)
    at Tree.when (http://localhost:8000/vendor/jquery/jquery.js:4033:4)
    at Tree._setInitialStates (http://localhost:8000/vendor/bootstrap-treeview/bootstrap-treeview.js:369:17)
    at Tree.<anonymous> (http://localhost:8000/vendor/bootstrap-treeview/bootstrap-treeview.js:206:17)
    at proxy (http://localhost:8000/vendor/jquery/jquery.js:10780:13)

In the meantime, nothing is shown at all on the webpage.

EDIT: This happens for me on the current version of Brave as well as Edge (dev version). On Firefox it seems to at least render after waiting quite a while.

Anthirian avatar May 03 '22 13:05 Anthirian

Hi @Anthirian. Thanks for the report. The above is most likely caused by the significant RBAC structure in one of your clusters. Would you be able to share more detail about the scale you are dealing with? As stated in the original issue a faceted tree view will need a rework to enable more complex RBAC to be presented in a more efficient way. Unfortunately I can't provide any timeline for it at the moment but any improvement contributions are welcome.

marcinc avatar May 05 '22 09:05 marcinc

I missed your reply back in May, my apologies. Here is the dataset that I used as input. It doesn't look like a significantly large set, but it might help pinpoint the issue. Thanks for your hard work.

rbac-configs.tar.gz

Anthirian avatar Oct 01 '22 20:10 Anthirian