We are implementing e-book reader based on documentviewer control. Each e-book is exe file with xps as embedded resource. XPS are decrypted and displayed by documentviewer control, hosted on plain C# form from System.Windows.Forms.
For some reason when user performs first copy (couple of paragraphs, not even the whole page) everything hangs for ca 60seconds, and additional 200-300MB is allocated. This memory is never released, and next copy operations work without additional time&memory overheads.
We have our own wndproc, which should handle clipboard operations, but delay and memory are wasted before wndproc on main form is called.
Anyone got any solution how to decrease time+memory consumption by documentviewer?