Patches item #1943614, was opened at 2008-04-16 00:25 Message generated for change (Settings changed) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1943614...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update.
Category: puredata
Group: feature
Status: Closed Resolution: Duplicate
Priority: 5 Private: No Submitted By: Jakob Leben (jleben) Assigned to: Nobody/Anonymous (nobody) Summary: speed up 'graph on parent'
Initial Comment: Here is the update of my patch filed as 1943301 (move instead of draw when 'graphed on parent') - now made with diff -uwB ;)
I fixed both of the bugs mentioned when I posted the first version of this patch. I noticed that one of them, namely the name of garray missing when array is created was a general bug and not produced by my code. This is now solved also, for the good of the pd community!
I also added iemgui_graph function which now all iemgui objects call as their graph_fn function and it in turn calls object's x_gui.x_draw function. This allows for graph_displace to make generic calls to graph_fn functions of all of it's children.
I would also like to point out that this patch only offers the possibility to use Tk command move for moving graphics of objects which are 'graphed on parent'. To add graph_fn functions to all the pd-vanilla objects I simply copied the code they use to draw themselves when being displaced, and currently many of them actually redraw themselves instead of just move. I paid attention that garray's graphics are really moved though, because to speed up array drawing was the main objective of writing this patch.
One problem I wish to point at is: if an object uses iemgui_displace function (and it holds the same now for new iemgui_graph function) it actually loses possibility to easily use Tk move command, because iemgui functions don't pass the dx and dy arguments to local object's functions they call for drawing. Thus using iemgui_displace and iemgui_graph makes it even less convenient and effective. I think iemgui functions should do more to make writing of gui externals easy.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2008-04-24 15:56
Message: Logged In: YES user_id=27104 Originator: NO
closed since this is replaced by #1948146
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-17 00:54
Message: Logged In: YES user_id=2064182 Originator: YES
File Added: pd-0.41-4.leben4-garrayonly.patch
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-17 00:53
Message: Logged In: YES user_id=2064182 Originator: YES
Fixed: wrong drawing of nested graphs-on-parent. File Added: pd-0.41-4.leben4.patch
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-16 22:13
Message: Logged In: YES user_id=2064182 Originator: YES
File Added: pd-0.41-4-leben3.patch
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-16 22:12
Message: Logged In: YES user_id=2064182 Originator: YES
New fix to the patch: changing plotting style for arrays didn't work right with the patch
A thought: with this patch, redrawing the array is reduced to one time only after changes on the array dialog are applied. I also tweaked some functions in g_array.c so that they produce as little redrawings as possible. However, both garray_resize and garray_redraw produce redrawing and they are both "public" functions (in m_pd.h). This behaviour seems logical, but for example soundfiler object uses them both when reading a file into the array, so that the array gets redrawn twice, which is not good according to how CPU demanding is the plotting of arrays currently. I have no ideas how to solve this. File Added: pd-0.41-4-leben3-garrayonly.patch
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-16 14:18
Message: Logged In: YES user_id=2064182 Originator: YES
File Added: pd-0.41-4-leben-garrayonly.patch
----------------------------------------------------------------------
Comment By: Jakob Leben (jleben) Date: 2008-04-16 14:17
Message: Logged In: YES user_id=2064182 Originator: YES
NEW FIXES: - displacing a graph on parent when it has it's window open moves graphical content inside this window. - displacing nested graphs on parent doesn't work (crash)
I realized that there IS quite a lot of externals that use widget behaviors, so I also made another patch witch only fixes slow displacing of arrays and doesn't bring new widgetbehavior. This one can safely be used with pd-extended. File Added: pd-0.41-4-leben.patch
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1943614...