You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pngs do not clear object properly in some cases #203
@danlipsa yes. I spent most yesterday on this. The cause is the configure/resize event.
When we resize (here to fit the png out size) we replot everything on the new size, but never delete the original objects (or some of them). This leads to lost objects. To make things worse after the png is plotted we resize again to the original size! So double leak! I'm not 100% on how I'm going to fix this.
@danlipsa if you have time sure, but create your own branch please. Whoever gets to fix it first. I'm thinking of saving the user calls on the display. And do a full clear and replot on a new display. Any other idea?
@doutriaux1 Not really. I think the root of the problem comes from the fact that resize calls plot, which saves stuff in vcs.elements. That slows things down as well. I look forward to when we'll move axes and labels to VTK. We won't need to do anything on resize at that point.
Even with the current implementation, I don't understand why we need a resize event.
Maybe I should let you fix this as I don't fully understand what is going on in there. It seems wasteful for both of us to work on the same thing. I can jump in if you want me too though.
@danlipsa yes. I spent most yesterday on this. The cause is the configure/resize event.
When we resize (here to fit the png out size) we replot everything on the new size, but never delete the original objects (or some of them). This leads to lost objects. To make things worse after the png is plotted we resize again to the original size! So double leak! I'm not 100% on how I'm going to fix this.
@doutriaux1 thanks for looking into it. I think we should fix the bug but I am wondering why we are doing resize in a batch script? Why not setup the size correctly in the beginning and in that way our users wouldnot hit the issue and give us some time to look into it.
@danlipsa I think one of the reason we need a full replot is for cases where the user sets an aspect ratio. In this case we need to create a template whose datawc_x1/x2/y1/y2 match the correct aspect ration given the window size.
Activity
danlipsa commentedon Jun 27, 2017
@doutriaux1 @aashish24 Is this what causes the slowdown we heard about in the ACME meeting?
doutriaux1 commentedon Jun 27, 2017
@danlipsa yes. I spent most yesterday on this. The cause is the configure/resize event.
When we resize (here to fit the png out size) we replot everything on the new size, but never delete the original objects (or some of them). This leads to lost objects. To make things worse after the png is plotted we resize again to the original size! So double leak! I'm not 100% on how I'm going to fix this.
danlipsa commentedon Jun 27, 2017
@doutriaux1 Great job narrowing this down. That resize is very convoluted indeed. I remember debugging that for vcdat. Should I look into this?
doutriaux1 commentedon Jun 27, 2017
@danlipsa if you have time sure, but create your own branch please. Whoever gets to fix it first. I'm thinking of saving the user calls on the display. And do a full clear and replot on a new display. Any other idea?
danlipsa commentedon Jun 27, 2017
@doutriaux1 Not really. I think the root of the problem comes from the fact that resize calls plot, which saves stuff in vcs.elements. That slows things down as well. I look forward to when we'll move axes and labels to VTK. We won't need to do anything on resize at that point.
Even with the current implementation, I don't understand why we need a resize event.
Maybe I should let you fix this as I don't fully understand what is going on in there. It seems wasteful for both of us to work on the same thing. I can jump in if you want me too though.
aashish24 commentedon Jun 27, 2017
@doutriaux1 thanks for looking into it. I think we should fix the bug but I am wondering why we are doing resize in a batch script? Why not setup the size correctly in the beginning and in that way our users wouldnot hit the issue and give us some time to look into it.
doutriaux1 commentedon Jun 27, 2017
@aashish24 it's from png, we can control the size of the output. Hence the batch script.
Regardless resizing on your screen in interact mode (or via GUI) will lead to the same leaks.
doutriaux1 commentedon Jun 27, 2017
@danlipsa I think one of the reason we need a full replot is for cases where the user sets an aspect ratio. In this case we need to create a template whose datawc_x1/x2/y1/y2 match the correct aspect ration given the window size.
danlipsa commentedon Jun 27, 2017
@doutriaux1 I see.
cleaning extra elts created internally that were not cleaned during a…