[Libreoffice-commits] core.git: Changes to 'private/jmux/new-vcl-scheduler+win_nolock'

Jan-Marek Glogowski glogow at fbihome.de
Mon Feb 6 13:46:09 UTC 2017


New branch 'private/jmux/new-vcl-scheduler+win_nolock' available with the following commits:
commit 3c3d1bc6a0c9ae3c4e2555c6e68c2f0f5c129660
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Sep 14 18:17:18 2016 +0200

    Don't poll busy documents via idle task
    
    Creates a very busy idle-loop, for non-task work like mail merge.
    
    Change-Id: If7be82e4675008f23e6f4f6be5c40df40a231a8b

commit fba5867d418162877cd7130b00bb223950391818
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Jul 31 16:35:49 2016 +0200

    Don't update document stats for non-idle views
    
    This functionality should be merged into the DocumentTimerManager,
    which itself should run the different document idle tasks via
    seperate jobs instead of a single idle, if they don't depend on
    each other.
    
    To implement a non-busy, suspendable Idle, this adds an AutoIdle
    class, which is automatically re-scheduled after being processed.
    
    It also adds a SwDocIdle, which isn't ready to schedule for busy
    documents.
    
    Change-Id: I185137ed3423ecaae0f7edb39018d26c4244d359

commit ff0e485650288868f0602c322926d2af1965a50d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Aug 10 12:00:53 2016 +0200

    Reorganize Scheduler priority classes
    
    This is based on glibs classification of tasks, but while glib uses
    an int for more fine grained priority, we stay with our enum.
    
    1. Timers start with DEFAULT priority, which directly corresponds
       with the previous HIGH priority
    2. Idles start with DEFAULT_IDLE priority instead of the previous
       HIGH priority, so idle default becomes "really run when idle".
    
    As RESIZE and REPAINT are special, and the DEFAULTS are set, there
    is just one primary decision for the programmer: should my idle
    run before paint (AKA HIGH_IDLE)?
    
    If we really need a more fine-grained classification, we can add it
    later, or also switch to a real int. As a result, this drops many
    classifications from the code and drastically changes behaviour,
    AKA a mail merge from KDE is now as fast as Gtk+ again.
    
    Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9

commit a85e82e51dc5937ba8177a091f0c86c29ca2b925
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Jan 8 11:18:00 2016 +0100

    MM don't generate documents for invalid emails
    
    If we don't have a valid mail address, there is no point merging a
    document.
    
    We also have to account differently for documents with fields of
    type RES_DBNEXTSETFLD or RES_DBNUMSETFLD, as these would advance
    the document cursor for multiple rows.
    
    Sadly there is currently no way to inform the user of bad email
    entries. As before these entries are just skipped.
    
    Change-Id: I2b02174e173b8b721c7394d47febfefd3b3066e9

commit f5ac558b6e83cf74a6d9f8fcacd9382a1c5fc013
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 16 21:04:59 2016 +0000

    Fix MouseOver handling for various controls
    
    This fixes the mouse over handling for Edit, ComboBox,
    ImplSmallBorderWindowView and ListBox.
    
    Change-Id: I6d3e91f786a4e43ca308f55baa9987db6d78949c

commit c800ead686ec131125ead3046088314ae30ce803
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 16 19:57:29 2016 +0000

    Change compound OnMouseOver handling
    
    This sends Notify events to the compound window, if the mouse
    enters to any of the childrens, or leaves from any of the children
    outside of the compound window / control.
    
    Additionally all leave events from the compound window are
    dropped, if the mouse moves to a child control.
    
    This allows us to skip a lot of redraws AKA flickers for border
    focus indicating themes (mbNoFocusRects).
    
    Change-Id: Ibc03226b1cb86443b62a688d3b98f17811b3db61

commit 35e87aa180a7687a90d9193da69a556c8fa63b27
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Apr 22 04:48:08 2016 +0200

    Disable font dependent tests when missing fonts
    
    A (very) few tests depend on correct MS metric compatible fonts,
    like Calibri, Arial and Times New Roman, and fail if these are
    substituted with incompatible fonts. Disable failing asserts, so
    we'll at least test loading the documents.
    
    Change-Id: I4d07ffa7cd0da17f1c6631641853779294426210

commit 99495878284bf50b253387252d32db39deed83f0
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 30 02:02:10 2016 +0100

    Just wait for the Yield mutex in the timer callback
    
    Probably this instantly deadlocks, but it's worth a shot ;-)
    
    Change-Id: Ib46eb6dbf57f29c85ffdbd6492922020f7785d30

commit 60b1545fb357054fdc1756bc7e1734a6ef5c3d6a
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 30 00:14:18 2016 +0000

    Simplify Windows system timer / LO event handling
    
    The system timer is supposed to have the following constraints:
    
    1. There is just one system timer, which drives LO event loop
    2. The timer has to run in the main window thread
    3. Messages are processed in order, so there is no real need for
       calling SendMessageW instead of PostMessageW
    4. LO event loop is supposed to be processed in the main window
       thread with the Solar mutex acquired
    5. The system timer is a single-shot timer
    6. The only one stopping the system timer is the scheduler, either
       when without tasks to process, or on VCL shutdown
    
    Following these constraints, we can remove quite a bit of timer
    handling code, which simplifies its handling.
    
    Drop the 16bit MAX duration limit, as CreateTimerQueueTimer uses
    a DWORD for the DueTime parameter, which is always UINT32.
    
    CreateTimerQueueTimer already sets the period to 0, which makes it
    a one-shot timer, but there is also the WT_EXECUTEONLYONCE, which
    enforces the Period parameter to be 0.
    
    Change-Id: I549142394334bdc098f053b42f222b23cf4fcecd

commit 5ce6efe397f2c754442530c1501da576701d5e0f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sat Oct 29 12:00:08 2016 +0200

    Unify deferred message handling
    
    Moves the common code into ProcessOrDeferMessage.
    
    All callers (try to) aquire the mutex before getting the
    WinSalFrame pointer, except for ImplHandleDeferredPaintMsg.
    
    This was probably an oversight, so this reverses the order in this
    function, so the GetWindowPtr is now always protected by the Solar
    mutex.
    
    Change-Id: Icb8f34f7e8716f0faa90a95903b1681f7489aed2

commit b8114d38c40d4d70c819134af3ba2e326f33acef
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sat Oct 29 02:11:32 2016 +0200

    Cleanup paint message handling
    
    Makes PAINT handling function use the POSTPAINT handling
    function and unifies the locking behaviour, so we now check
    the frame before trying to aquire the lock in both functions.
    
    Change-Id: Ia6bac6e24d95e680830c5405f0ab34cbed6e9688

commit de58963def56f7225cabe909d844d739db8b7233
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 23 14:01:45 2016 +0200

    Reduce <vcl/scheduler.hxx> header scope
    
    This includes <vcl/timer.hx> and <vcl/idle.hxx>.
    
    Change-Id: Ia1d042db670bdd20ce82b45d8cd41bc0d2f56d5f

commit 664cc6b1470c6f3a024c47ecb5b81154b22cb9b0
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Tue Nov 1 09:32:55 2016 +0100

    Revert "sfx2: ensure that no timers are running...
    
    ... after SfxApplication dies"
    
    This reverts commit 2e29a518b04250b5f9cc9d0d77da3df076834d60.
    
    Change-Id: I447b520f8a54634e98deb70579efee47588fe28c

commit 9cc211043705968aa2873d7de612950b5b7f9fc7
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Tue Jan 31 19:15:12 2017 +0100

    Start VCL de-initialized
    
    Changes the semantics of ImplSVData::mbDeInit to indicate the VCL
    init status instead of VCL de-initializing.
    
    Change-Id: Ib094197f871aafa00d3fc807a5ed937bad59d2f4

commit 65f61785d0ba5d7faad10d2aa814ad6435b676b9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 30 14:30:57 2016 +0000

    Prevent Task deletion while invoking
    
    This is currently just a convenience feature to prevent deleting a
    Task object while it is invoked.
    
    Self-deleting Tasks now have to be disposed explicitly to prevent
    deadlocking the Scheduler.
    
    Change-Id: I5b19fb65798a64736757862a5b7936420aaad599

commit 43905a4749a6b829723cc53e157e9e44f9d1d995
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Jan 29 17:12:25 2017 +0100

    Drop Task::ReadyForSchedule
    
    All relevant information is also provided by UpdateMinPeriod and
    the calculations were even duplicated. This also includes dropping
    Scheduler::UpdateMinPeriod, as this is now reduced to a simple
    comparison and assignment, as we simply ignore larger returned
    sleep times.
    
    Change-Id: I13852e3e63daead451bf7fcb98be9b1d44bd7abd

commit d31cb4c64f1e41be4ec5baf1bee3513bd936c8b5
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Jan 29 01:27:17 2017 +0100

    Refactor Scheduler global data
    
    Move all Scheduler members of ImplSVData into ImplSchedulerContext
    and make ImplSchedulerContext a member of ImplSVData.
    
    Change-Id: I186bebdfb5701543595848968235b5a56b6598e9

commit e2aad21d4e11464e7ee66b3c1199f6e33bff3af8
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Nov 10 18:16:49 2016 +0000

    KDE4 handle timers via queued custom events
    
    Post the system timer as a custom event to the event queue and also
    changes the PostUserEvent froom a timer to a posted custom event.
    
    Change-Id: I0b77e0c64fce04b20e82ba8bbf72b7a99b1339af

commit 699bbaa7c2d92017ec67975aa0446d588ad2f5f8
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sat Jan 28 00:54:33 2017 +0100

    Remove duplicated delete information
    
    Task::mbActive already stores the inverse information of
    ImplSchedulerData::mbDelete, so we can drop the latter one.
    
    Change-Id: I57f8c23ca1eebdeed780a644c83fcbeb9b92cd66

commit 63ab7685e6f23cac710d0a6a4ea22a4446731aa9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Jan 27 23:40:11 2017 +0100

    Run LO Scheduler only via system timer
    
    Change-Id: I5283f18aebcd6797ad35771ae8fc4a0f425ff924

commit 14e4064f7b3b6f87d2ab1a9c1d9bf80afa6c1b39
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Nov 13 06:13:22 2016 +0100

    GTK simplifiy system timer implementation
    
    Instead of implementing an own GSource, this implements the glib
    based system timer using the g_timeout_source_new() function.
    
    It removes the vector of GtkSalTimer and changes the remaining
    timer to be single-shot, just like the Windows and KDE platforms.
    
    Change-Id: Iea40a6284bdc5c121235af5a6079a92a679391ca

commit 067c00edd3221865b7b576e48c14cf0fcf5f8a15
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Mon Oct 31 22:50:21 2016 +0100

    KDE4 change system timer to be single-shot
    
    Change-Id: I21a0a62bd0cd122e0da676579d2b2a93264acdd8

commit 6e1adc9349a3f63006ce946e09936d63308646b1
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Sep 14 15:33:54 2016 +0200

    Run Idle tasks immediatly
    
    There is really no reason to wait a millisecond for an idle.
    
    Change-Id: I7665d5f2e7d6ba3e01290a692bbc8e42c36b9986

commit 16194a196777c32cf7c0530da6f139f48185a088
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Jan 29 01:50:24 2017 +0100

    Correctly handle SVP / headless sleep time
    
    Don't add 500 usec for 0ms sleeps and always round up the sleep
    time so we won't sleep too short.
    
    Change-Id: I28dda435de44031c050b6edbfae1e9d392465d24

commit 733d52d7468bd827e1589e6f55b6cfa2b3debc36
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jan 25 15:53:15 2017 +0100

    Round-robin invoked tasks
    
    Add some round-robin to the task processing, so equal priority
    (auto) tasks won't always be scheduled, if there are multiple
    tasks with the same priority.
    
    Change-Id: Ice111aa5f85e9181b3ee9799ca4df0d58f210fe9

commit 447d114b58de5433c06991b98cef5fbc92c4881e
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sat Jan 28 00:31:21 2017 +0100

    Correctly account invoked task
    
    Don't account the to-be invoked task before invoking it.
    If it happens to be restarted, account it and eventually lower
    the system timer timeout.
    
    Change-Id: I567e3b92c6c2999ce51aecb31f858e51cab6c999

commit 5083852c95ca0ad94b850d5aaa4fbd01105f0353
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jan 25 15:49:44 2017 +0100

    Introduce a scheduler stack
    
    While the stack removes all invoked tasks from the queue, which
    actively removes it from scheduling, it also helps to faster handle
    nested calls, as we don't have to look for the previous position
    to move the task to the end of the queue for the round robin.
    
    Change-Id: I358cf2492e9630f67685a2b780509edb56691830

commit a77979e2bad119a2fa7412ae22582b1ad3dc0c6f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Jan 25 11:22:56 2017 +0100

    Correctly account starting tasks
    
    When (re-)starting the system timer for new task, we have to take
    the already passed time into account to correctly set the new
    timeout time for the system timer.
    
    Change-Id: I1c1c61b3e54bd14d9451c53150251534b2a960f0

commit d74d54216d073eec4139e10f49346fd48e6fe866
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Sep 8 06:55:30 2016 +0200

    Drop special idle handling
    
    Idles are just instant timers, which should most time have a low
    priority, By dropping most special idle handling we'll just
    schedule by priority.
    
    This also reverts SalYieldResult back to a bool, which just
    indicates if any event was processed.
    
    Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d

commit 1260ffc0caf2b744449b50d404688884b945d91a
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Oct 30 00:03:34 2016 +0200

    Change scheduler list to be queue-like
    
    The scheduler modifies the SchedulerData list mainly in two ways:
     1. Remove a finished item
     2. Append a new item
    
    This optimizes the Append operation by keeping a last element
    pointer, so we don't have to walk the whole list to find it. This
    way this list is converted to a queue-like structure.
    
    Change-Id: If7214e1f6016414551abbef11f26f332737f7893

commit ba5043ffa82bf169184b02a8b020d2b340eec7ed
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Jan 20 13:24:02 2017 +0100

    Just walk the task list once
    
    This refactors some more scheduler code by merging the code from
    ProcessTaskScheduling into CalculateMinimumTimeout and keeping the
    ProcessTaskScheduling name.
    
    It replace the bHasPendingIdles information with a HasPendingTasks
    function, based on the sleep timeout and invoke time.
    
    To drop IsIdle() we simply account Idles again and stop the system
    timer, so we instantly run our application loop again. This makes
    all Tasks really run immediate instead of waiting 1ms.
    
    Change-Id: I690a8754e6b115a53e74ef777e988b66b4e5037f

commit 8e53fb6f4c19dbad5ab902ddee0a9157c937db77
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Jan 20 13:12:43 2017 +0100

    Refactor Scheduler by merging functions
    
    Merges ImplSchedulerData::Invoke() into ProcessTaskScheduling()
    and removes indention levels in CalculateMinimumTimeout by using
    goto. This is straight forward.
    
    Change-Id: I740b97315df92f8b979089e7e22058e628f95bc0

commit 405446a94303d8052696ce6b47a1634536aead95
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Mon Jan 23 11:56:41 2017 +0100

    Add some Scheduler unit tests and logging
    
     1. calling Start() for invoked tasks
     2. correctly schedule by priority
     3. self-stopping AutoTimer
    
    This also adds SAL_INFO output to Scheduler and Task to log the
    scheduling processing tasks.
    
    Change-Id: I3c8a708d1fd51c550320f8af3f9486c43c32e358



More information about the Libreoffice-commits mailing list