[Haskell-cafe] Diagrams and GTK
Michael Oswald
muell_om at gmx.net
Fri Aug 9 09:21:03 CEST 2013
Hello,
I am currently writing an application which draws the structure of some
packets with help of the diagrams library directly to a GTK GUI.
Now the packets can have several hundreds of parameters which have to be
drawn so it takes some seconds to calculate the diagram itself. Of
course this now blocks the GUI thread, so the basic idea was to put the
calculation in a separate thread. Unfortunately this doesn't work as
lazyness kicks in and the final diagram is calculated when it is
rendered and not evaluated before. Using seq didn't help (because of
WHNF) and there seems to be no deepseq instance for the diagrams.
Does somebody has an idea on how to speed this up / get the diagram
evaluated strictly as especially scrolling the DrawingArea is now really
a pain?
lg,
Michael
More information about the Haskell-Cafe
mailing list