mono/MonoGame — pull request #2291 by nkast (2014-03-23 03:14:32+00:00)
Title: Memory optimization for Effects

Effects keep a static copy of the shader Bytecode.
The 5 stock effects are about 100KB which could be significant on the
mobile. The bytecodes are already loader in memory as Resources in the
assembly, so loading them each time is not that slow.

The only slowdown could be the conversion from stream into byte array
inside LoadEffectResource(). This can be addressed by extending the
effect to accept streams. The Effect constructor converts the byte[]
into a stream/BinaryReader anyway so we could pass directly the stream
and avoid any data copy.