https://bugs.documentfoundation.org/show_bug.cgi?id=105575
--- Comment #33 from László Németh <[email protected]> --- Commit description: tdf#105575 LibreLogo: speed up by lock (re)paint Speed up program execution by default partial locking of repaint and custom locking of paint, using UNO lockControllers(). – Default: speed up LABEL and TEXT by locking their repaint during the various text operations, i.e. setting size and text portion formatting changes were visible, and slow. Locking while manipulating a shape was suggested by Noel Grandin. – Custom: SLEEP command with negative argument calls lockControllers(), SLEEP command with not negative argument (and program termination) call unlockControllers(), so it's possible to lock program parts to speed up program execution e.g. 3-4 times or more. For example: ; lock paint until program termination SLEEP -1 program or ; lock until SLEEP 0 SLEEP -1 commands_without_paint SLEEP 0 ; unlock a single level and paint/repaint everything – Add __get_time__() command to get the elapsed time from program start for profiling. Add unit tests. Note: custom locking with SLEEP has known problems: not connected lines, bad position of arc/pie, non-working CLEARSCREEN. Note: The reported code is more than 32 times faster (4 sec vs 2.2 min) with custom locking, also using the commented line to show not only the result with 400 circle shapes, but the partial result with 100, 200 and 300 shapes, too: SLEEP -1 REPEAT 400 [ CIRCLE 10 + REPCOUNT/10 FORWARD 5 + REPCOUNT/10 LEFT 10 ] ; IF REPCOUNT % 100 == 0 [ SLEEP 0 SLEEP -1 ] ; to show partial result SLEEP 0 PRINT __get_time__() -- You are receiving this mail because: You are the assignee for the bug.
