This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 27794 - Window splitter dragging is slow
Summary: Window splitter dragging is slow
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL: http://performance.netbeans.org/respo...
Keywords: PERFORMANCE, UI
Depends on:
Blocks: 26581
  Show dependency tree
 
Reported: 2002-10-03 17:33 UTC by _ rkubacki
Modified: 2008-12-23 09:53 UTC (History)
7 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
diff of patch (18.56 KB, patch)
2003-01-28 13:39 UTC, Peter Zavadsky
Details | Diff
patch to try out (put it in {nb}/lib/patches directory and restart (4.75 KB, application/zip)
2003-01-28 13:41 UTC, Peter Zavadsky
Details
Refined diff of patch (18.56 KB, patch)
2003-02-17 16:56 UTC, Peter Zavadsky
Details | Diff
Refined diff of patch (previous one is the old one by mistake) (19.44 KB, patch)
2003-02-17 16:58 UTC, Peter Zavadsky
Details | Diff
Refined patch (17.42 KB, application/zip)
2003-02-17 16:59 UTC, Peter Zavadsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2002-10-03 17:33:58 UTC
Dragging window pane splitter is slow. Perhaps we
should disable continouos repainting of panes
while the splitter is being dragged, only the
splitter outline is painted

Dragging editor window across desktop in MDI. This
feature may go away if we'll kill overlapping
windows in MDI internal desktop.
Comment 1 David Simonek 2002-11-14 15:50:38 UTC
Peter, please take care of impl of this task. Good solution IMO is to
make similar outline like standard swing's JSplitPane has.
Comment 2 Marian Mirilovic 2002-11-22 11:36:22 UTC
Marian's measurement (time in milliseconds):
conditions: 
 - SUN UltraSparc60 / 512 MB RAM / Solaris 5.8 / CDE
 - JDK1.4.1(01)
 - [nb_dev](200211140100) , MDI
        - mounted sampledir

dragging window pane splitter
 opened Source Editor (maximalized), drag splitter SE|Explorer
                                432     503     487
dragging editor window across desktop in MDI
                                70      71      79

Test cases described on page :
http://performance.netbeans.org/qa/TestSuites.html#dragging_window_pane_splitter
http://performance.netbeans.org/qa/TestSuites.html#dragging_SE_across_MDI
Comment 3 Peter Zavadsky 2003-01-15 13:29:25 UTC
Note:
This seems to be very inefficient solution. 
It is rather necessary to remove PerimeterPane usage completelly (just
makes problems), than waste time trying to make it work like JSplitPane's.
Comment 4 David Simonek 2003-01-15 14:57:55 UTC
Can you be more specific about problems that PerimeterPane caused us?
I personally agree with your conclusion, moreover impl of outline
dragging is for free when we will use JSplitPane, but it's better to
know why we want to get rid of PerimeterPane.
Actually, would it be possible to use results of work in winsys new
layout branch for this? This seems to me like attractive solution...
Comment 5 Peter Zavadsky 2003-01-15 17:58:15 UTC
Well, I'm doing on this anyway.

To the above, it is just am overall complaint.
 I think it is alway better use the standard components when possible
than create its own ones. It makes it easier maintain and when some
typical feature is needed like this one, it could be just switched on.

In this case, I can't just switcht it on, I have to implement it from
scratch in PerimeterPane, which is a bit difficult, since it doesn't
have splits in fact etc., just it wasn't designed that way.
This time I could spend if used JSplitPanes before, that's all I
wanted to say.

To the branch:
The views and especially the work with JSplitPanes was done by Marek
(cc'ing). I just guess it is not so easy to use, because the branch
wasn't finished, and the views were tightly connected to the new
model, i.e. split hierarchy.

So for the moment, I guess I could solve it this way. Replacing it
with JSplitPanes, is still bigger task and not suitable for current
time schedule.
 Although also here some problem could happen. You'll see some results
soon.
Comment 6 mslama 2003-01-15 18:03:04 UTC
As far as I remember there is our own splitter in PerimeterPane. I
think the only thing to do is to call resize on its panes when
dragging is finished not during mouse move. There is already
enhancement on this.
Comment 7 David Simonek 2003-01-15 18:11:12 UTC
Marek, this isn't complete. You have to draw the outline as well.
Peter, I'm little bit brain-dead today, so just for clarification - I
would be happy if we can get rid of PerimeterPane, exactly for the
reasons you mentioned. Just asking - do you plan to throw
PerimeterPane out or not now? It wasn't clear to me from you previous
comment.
Comment 8 dpavlica 2003-01-20 09:42:49 UTC
From UI point of view:
Suggested solution is ok, but if you want to remove 
continuous repainting of panes then this splitter outline 
is really necessary to paint at least.
Comment 9 Peter Zavadsky 2003-01-28 13:39:42 UTC
Created attachment 8694 [details]
diff of patch
Comment 10 Peter Zavadsky 2003-01-28 13:41:06 UTC
Created attachment 8695 [details]
patch to try out (put it in {nb}/lib/patches directory and restart
Comment 11 Peter Zavadsky 2003-01-28 13:45:56 UTC
Try out the patch.

It is almost working.

But it has significant drowbacks, it seems it doesn save any time. The
technique ised, created background image of the component and then
repaints the image and the splitter. The problem is when I tried to
paint the clipping region with the splitter only, some component above
in AWT hierarchy (my guess) repainted the background thus cleared the
components.

Also look, at how is painted output window (the part where the
scrollbars join -> it shows how bad is output paint done).

In sum it seesm it is not so easy to implement the JSplitPane-like
feature, and I vote for wontfix of this issue, for this moment, better
is later to move to JSplitPanes (which requires bigger work), because
this tunig seems to me too risky, to provide some bigger changes in
paint mechanism.

Please deside.
Comment 12 dpavlica 2003-02-07 18:01:38 UTC
So I don't see any problem with painted outline on 
Windows. But I know that on Linux it could have 
performance problem. So I am ccing Jano Rojcek.
Comment 13 David Simonek 2003-02-17 15:23:04 UTC
Something's wrong, patch doesn't work for me, it gives me
NoSuchMethodError: PerimeterPane.AWTListener<init>
It looks like AWTListener inner class is missing in the patch?
Comment 14 Peter Zavadsky 2003-02-17 16:56:07 UTC
Created attachment 8990 [details]
Refined diff of patch
Comment 15 Peter Zavadsky 2003-02-17 16:58:00 UTC
Created attachment 8991 [details]
Refined diff of patch (previous one is the old one by mistake)
Comment 16 Peter Zavadsky 2003-02-17 16:59:13 UTC
Created attachment 8992 [details]
Refined patch
Comment 17 Peter Zavadsky 2003-02-17 17:02:07 UTC
Here is the refined patch, which uses JSplitPane approach by
repainting. (The previous one was slightly wrong).

Please try it out and let me know whether to put it in. It should be
also safer than the previous one.

In case of yes, let me know whether to provide switch which would let
the old behaviour to work.
Comment 18 David Simonek 2003-02-18 12:15:00 UTC
I reviewed current patch and I must say: WOW, YES! It's really ok,
I've encountered no problems with output window. Try to compare with
3.4 version with some rich window config (many editors opened etc.)
and you'll see big difference.
I'm amazed and vote for integration.
Comment 19 jrojcek 2003-02-18 12:35:30 UTC
Yes, it looks good, and works ;-).
Comment 20 Peter Zavadsky 2003-02-18 16:08:14 UTC
Fixed in [trunk].

core/../windows/frames/PerimeterPane.java 1.24
Comment 21 Marian Mirilovic 2003-02-18 16:12:55 UTC
x
Comment 22 Marian Mirilovic 2003-02-18 17:26:08 UTC
fixed
Comment 23 Marian Mirilovic 2004-03-01 08:52:59 UTC
issue doesn't apply to new window system - verified