I set renderer.encoding=sRGBEncoding, and now my framerate dropped to 3-4fps

I have a pretty complex scene (I’m using ngl which is built on three.js). I’m just starting to add color management, so I set renderer.encoding=sRGBEncoding. Now suddenly my frame rate is 3fps instead of 60, but only when my mouse is moving. Looking at chrome dev tools it seems like most of the time is spent in this bottom-up call stack:

getProgramParameter
  fetchAttributeLocations
    WebGLProgram.getAttributes
       initMateral
         setProgram
            ...renderObject

I know my way around 3d in general but I’m not expert on WebGL or three.js yet. Does this stack mean my materials are getting reinitialized every frame? Is there something I can do about that or is it expected?
My code does alternate between a regular render and a pick render (to a render target).

Aha, I found it. My pick render renders to a render target (as you’d expect), and that render target is a texure (of course), and I needed to set that texture’s encoding to the same sRGBEncoding to fix the slowness. Otherwise the renderer has to switch encodings every frame, and then it has to rebuild the materials.