Enabling / disabling large Canvas e.g. MainMenu

To hide / show the Main Menu in our game I use CanvasGroup and set its alpha to 0.0 / 1.0 respectively. During development of the Menu I believed it was the best solution (I made several experiments and monitored profiler to find the best one). However today I discovered that we have unpleasant 3-5 ms of PostLateUpdate.PlayerUpdateCanvases which are caused by the Menu when it’s hidden: if I deactivate the whole gameobject (in a purpose of testing) they are all gone.
But for sure disabling/enabling the whole gameobject is not the right way in context of UI. In the optimization guide it is said that thee CanvasRenderer must be enabled/disabled in this case. But CanvasRenderer has no ‘enabled’ property since it inherits Component, not Behaviour. Although I doubt it would help even if it had that property because CanvasRenderer is responsible for rendering individual UI elements not the Canvases.
Maybe it was meant to enable/disable the Canvas itself? If so it’s not the case as well due to this weird behaviour with nested Canvases.
So what is the right way to hide / show menus specifically and complex Canvases in general?

I’m enabling and disabling the whole main menu gameobject, because it really isn’t happening that often in our game, that the player switches between between the menu and the game. Did you profile if that really is a problem for you?

Other than that, I’m pretty sure that they refer to the Canvas component (and while you’re at it you can also disable and enable the canvas scaler). I never noticed a change in the transform position afterwards. Did you try to just disable and enable the root canvas scaler (in the editor in playmode)? Does this create the problem as well?

Yep. And it produces a noticeable spike (~60 on disabling / ~150 on enabling) as expected and as mentioned here

Yep as well. The problem occurs when you have nested Canvases, i.e. some Canvas has Sub-canvases.

Hm, interesting. I took a quick look where I found the information with disabling the canvas component:

So that should be the way to go. I do have subcanvases, but you’re right I never disabled a canvas component with a subcanvas. How deep is the subcanvas structure? Could you put everything into subcanvases (with no other subcanvases in there) and then just disable those but leave the root canvas active?