# Recommendations for optimizing the following scenario

**URL:** <https://forums.imgtec.com/t/recommendations-for-optimizing-the-following-scenario/2863>\
**Category:** Uncategorized\
**Created:** [January 18, 2019, 1:59pm UTC](https://forums.imgtec.com/t/recommendations-for-optimizing-the-following-scenario/2863 "2019-01-18T13:59:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![desperado](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@desperado](https://forums.imgtec.com/u/desperado)\
**Post date:** [January 18, 2019, 1:59pm UTC](https://forums.imgtec.com/t/recommendations-for-optimizing-the-following-scenario/2863/1 "2019-01-18T13:59:53Z")

</div>

- One frame has several dozen drawcalls.
- Drawcalls are grouped by blending, stencil etc. state
- Some uniforms change after every drawcall (glDrawArrays)
- Program is only changed once per frame
- Vertex buffer changes after every drawcall, but the same vertex buffer is used every n draw calls.

Attachment is a command dump of one frame.

It seems we have a large cpu overhead in a function called WritePDSVertexShaderProgramInternal. I suspect this has to do with vertex buffer changes.

Do you have tips on optimizing this? I have GLES 3.1, eventually I will upgrade to 3.2.[glloggingcommandonly.txt](https://forums.imgtec.com/uploads/short-url/75tu3XqnXc6sF8vkp8YaXyjOsaD.txt) (754.8 KB)

---

<div class="post-metadata">

**Author:** ![MartonTamas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/martontamas/32/297_2.png) [@MartonTamas](https://forums.imgtec.com/u/MartonTamas)\
**Post date:** [January 21, 2019, 2:47pm UTC](https://forums.imgtec.com/t/recommendations-for-optimizing-the-following-scenario/2863/2 "2019-01-21T14:47:37Z")

</div>

Hi,

can you please provide us with a PVRTrace recording so we can profile this application against our drivers?

thank you,  
Marton
