[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
are dynamic windows really 60X slower than old windows?!
dc> I measured the time to do draw 240 rectangles (with :DRAW-RECTANGLE) and 80
dc> strings (with :DRAW-STRING) to a DW:DYNAMIC-WINDOW. It took 20 seconds!
dc> Then I did the same thing to a TV:WINDOW. It took .35 seconds.
dc> Could dynamic windows really be that slow? Surely not possible. I must be doing
dc> something wrong. Is there a trick to bring graphics speed to a dynamic window to
dc> at least within a factor of 2 of a static window?
smk> How about passing along the code you used to do this?
Here is some simplified but meaningless code that exhibits similar time
disparities to my original:
(DEFVAR DW (TV:MAKE-WINDOW 'DW::DYNAMIC-WINDOW))
(DEFVAR SW (TV:MAKE-WINDOW 'TV::WINDOW))
(DEFUN TEST (W)
(SEND W :EXPOSE)
(TIME (DO-IT W))
(SEND W :BURY))
(DEFUN DO-IT (W)
(LOOP REPEAT 1000
(SEND W :DRAW-RECTANGLE 200 20 10 10 TV:ALU-ANDCA)
(SEND W :DRAW-STRING "HELLO" 10 10)
(SEND W :DRAW-RECTANGLE 200 20 10 10)
(SEND W :DRAW-RECTANGLE 200 20 10 10 TV:ALU-ANDCA)))
Now I run TEST with the static window and dynamic window in turn:
Evaluation of (DO-IT W) took 6.289433 seconds of elapsed time including:
0.089 seconds processing sequence breaks,
0.116 seconds in the storage system (including 0.105 seconds waiting for pages):
0.116 seconds processing 21 page faults including 3 fetches,
0.000 seconds in creating and destroying pages, and
0.000 seconds in miscellaneous storage system tasks.
Evaluation of (DO-IT W) took 168.329730 seconds of elapsed time including:
2.623 seconds processing sequence breaks,
5.924 seconds in the storage system (including 4.312 seconds waiting for pages):
4.891 seconds processing 668 page faults including 167 fetches,
0.976 seconds in creating and destroying pages, and
0.057 seconds in miscellaneous storage system tasks.
23,728 list, 29,373 structure words consed in WORKING-STORAGE-AREA.
768 list words consed in GC-TABLE-AREA.
68,000 structure words consed in *PRESENTATION-AREA*.
The example code given performs similar operations, in the same proportions, as
the original. The application is a graphical meter display, where 80 bar
graphs and 80 numbers must be refreshed frequently, perhaps up to once per second.
I am not interested in mouse-sensitivity here. I am using dynamic windows only for the
ability to scroll through a virtual window bigger than the actual window size.
But I will sacrifice this ability for speed, if necessary.