Re: [Mesa-dev] [PATCH 0/2] glsl: avoid quadratic behavior during preprocessing

2017-08-26 Thread Thomas Helland
Hi, I haven't looked to closely into this series yet. Just thought I'd point out this series I wrote back in May, in case you didn't see it, or remembered it. I haven't gotten around to finishing it (whats left is porting the tests to gtest). The implementation should be fine though; I've put it

[Mesa-dev] [PATCH 0/2] glsl: avoid quadratic behavior during preprocessing

2017-08-26 Thread Nicolai Hähnle
Hi all, The GLSL preprocessor operates by successively appending preprocessed pieces to a string via ralloc_str_append and friends. Each of these functions calls realloc() every time it is used, which is potentially quadratic behavior. This doesn't seem to be a problem usually because the system