Updating MD and the EDT

Mike Bray (Quote Loader Author)'s Avatar

Mike Bray (Quote Loader Author)

13 Feb, 2025 09:50 AM

I am under the impression that all updates to the MD database should be executed on the Swing EDT as this is not thread safe. Some users are experiencing timing issues when save Quote Loader prices. This seems to being caused by the new 'Net Worth' calculation in build 2024.3. It is hogging the EDT preventing Quote Loader from progressing.

Is it still the case that the EDT should be used for updating? Is there anyway to synchronize the updating or preventing the Net Worth calculation from running?

  1. Support Staff 1 Posted by Sean Reilly on 13 Feb, 2025 01:20 PM

    Sean Reilly's Avatar

    Hi Mike,

    On the contrary, there is no requirement that operations be performed on the EDT, other than those which update the UI. The new NW calculation has been improved in that it does not perform its calculations on the EDT, and only has a minimal bit of code running on the EDT to update the display after the calculations are finished.

    Quote Loader should definitely not be running on the EDT, and I'd say it also shouldn't be saving changes on the EDT either.

    I have seen a customer recently who said that Moneydance was taking a long time to quit, and the issue ended up being that QL was running on the background thread to update security prices. If that is the issue, I wonder if we could add a check in QL's code to stop downloading if the current file has been closed or is closing?

    Please hit me up on slack if you think the NW calculations are starving the EDT, as I'd be very interested in addressing it!

    Thanks,
    Sean

    --
    Sean Reilly
    Developer, The Infinite Kind
    https://infinitekind.com

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac