WPF - Slow performance when recreate and draw very big bitmap frequently -


in application, whenever user moves mouse around, have re-create new bitmap high resolution ( may reaches 3000 pixels x 3000 pixels @ biggest size). size of bitmap depends on mouse is. example: size smallest when mouse on top-left corner of screen , biggest when mouse on bottom-right corner.

enter image description here

the problem when mouse far away top-left corner, size of bitmap big. checked , realize time of re-creating , drawing bitmap drawingcontext in onrender fine. there may bottleneck in framework, takes long time transfer drawing data in drawingcontext screen. , influences wpf mouse input system, next mouse move event fired late , application becomes laggy. here question on site related problem: the reason behind slow performance in wpf

do have idea solve problem?

ps: whenever user moves mouse, create new bitmap , draw on it, call invalidatevisual() , draw bitmap drawingcontext.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -