Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Option to control inlining #221
I would like to suggest an addition to control the inlining of functions. While adding inline before each function could be tempting I think the simplicity of osl scripts would work well with a global option.
I suggest something like #pragma inlining on/off could be added near the top of a script to turn it on or off, with the render engine defining which is default.
As an example I have a script of 173 lines - SARock.osl. If you discount the input parameters and the function calls broken into three lines you end up with about 50 real lines of code. Due to it's repetitive nature it compiles to a 7.6MB oso file. I would expect non-inlining to reduce that to less than 1MB. This would also filter through to reduced memory usage when rendering.