gl-react
gl-react copied to clipboard
GLSL Edit - gl-react-expo performance
bug report
Performance of GLSL Edit in gl-react-expo is not great.
Expected behavior
Expect smooth 60fps
Actual behavior
Persistant judder and < 60fps
Steps to reproduce the behavior
Load GLSL Edit example from within Expo on iPhone 6
issue is probably because the compile shader code is blocking the js thread & takes some time. we might need to debounce the keyboard events.
but even if you don't touch the code and don't touch the keyboard ?
oh really? and this is on the device right?
Ok I think I see what's wrong
https://github.com/gre/gl-react/blob/master/packages/cookbook-rn-shared/src/examples/glsledit/index.js#L55
can you try to change to
visitor.onSurfaceDrawEnd = () => {
if (this.state.error) this.setState({ error: null });
}
?
Sure. I've pulled repo and made the change. Unsure how to "start" ?
see https://github.com/gre/gl-react/blob/master/CONTRIBUTING.md
for the cookbook expo app, you should be able to open the packages/cookbook-expo with expo/Expo XDE.
Sorry - I've been trying to test this, but so far failed to get it building with any changes - :(