Inking Performance. RRS feed

  • Question

  • I have a very nice inking module in my program. It's almost perfect except that when there's a lot of ink, there's a medium performance penalty.

    That being said, no it's not my module.

    1. I only render every end of the stroke. For the mean time, the canvas are filled with lines and ellipse.
    2. When it's the end of the stroke and I render, I only render that very last stroke added. That being said, I also delete the lines and ellipse since it will be replace by a stroke.

    I only rerender everything when I erase or loading everything from SQLite database. Other than that I made sure that complexity is constant throughout the inking.

    After doing a lot of test, and placing break points at everything except the stroke rendering routine, none of the breakpoints are called, thus my code contains no bottle neck whatsoever.

    My best suspect is that this is because API is re-rendering the whole canvas, this is because the effect of slowing down is magnified when I enabled BitmapCaching in canvas.

    So my question is, if this is a case of API re-rendering canvas, how can I select a small portion of the canvas to be re-rendered. If not, what else could've been causing this bottleneck and what can I do to fix this.

    Thanks in Advance,

    Joey Andres. 

    Saturday, February 8, 2014 1:58 AM

All replies

  • How are you rendering this and what exactly is the symptom? can you provide a minimal repro? Are you using Xaml or DirectX? DA will be faster and more responsive. Xaml will always have some latency issues and lay a bit behind the pen.

    The Ink Manger doesn't do any rendering itself so tautologically it doesn't have rendering problems.

    Saturday, February 8, 2014 3:34 PM