Giter Club home page Giter Club logo

Comments (6)

devmount avatar devmount commented on June 8, 2024 1

In fact it should be possible setting the timer in the background.js, but only if you find a way to call the reprocessing function from outside the Vue instance... I didn't look into that yet, but I'll see what I can do.

from third-stats.

koobs avatar koobs commented on June 8, 2024 1

Referencing here findings & summary notes (with links and quotes in context) of ~2 hours of research re Thunderbird and Timers. Hope it saves you some time :)

tldr appears to be:

  • nsItimer
  • setTimeout()
  • Experiments API ( + wrappers)

Search: nsITimer (is XPCOM)

AdBlockPlus Issue 7375 - Replace Ci.nsITimer with setTimeout()

TorBrowser: Investigate new WebExtensions API requirements for our extensions

WA7: Timers: Current Solution: nsITimer with TYPE_ONE_SHOT New Solution: window.setTimeout(). Also look at chrome.alarms.*

Search setTimeout

Search idle

[x] Automatic thirdstats processing
   [x] Only when idle (or locked)

Thunderbird 102 supporting addon: Quick Folders

QuickFolders apparently supports 102 (issue above is performance issue on 102)

Update-Info from Mozilla: Version 102.2.2, first offered to channel users on September 7, 2022

    fixed: Accessing mail folders in profiles with many folders was slow

QuickFolders uses Timers (WindowListener/* & setTimeout (in quickfolders-interface.js)"

    ...
      // async sleep function using Promise
      async sleep(delay) {
        let timer = Components.classes["@mozilla.org/timer;1"].createInstance(
          Components.interfaces.nsITimer
    ...
            Components.interfaces.nsITimer.TYPE_ONE_SHOT

The WindowListener API may only be called from the background page.

from third-stats.

devmount avatar devmount commented on June 8, 2024 1

Wow thanks! I'll look into that.

from third-stats.

koobs avatar koobs commented on June 8, 2024

Thinking about it more, and how the value of thirdstats is likely proportional to mail store size, I'm going to up my recommended default time to 24 hours (once a day).

from third-stats.

devmount avatar devmount commented on June 8, 2024

The automatic background processing is a timer which starts when opening the stats page and is only active as long as the stats page is open. So 24h means you'd have to have your stats page open 24h.

Given that, I think 6h is just fine to reprocess the data at least once on a working day.

from third-stats.

koobs avatar koobs commented on June 8, 2024

The automatic background processing is a timer which starts when opening the stats page

Not possible to register a timer on extension load/init, independent of whether stats is open or not?

from third-stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.