Giter Site home page Giter Site logo

Comments (10)

piroor avatar piroor commented on June 16, 2024 1

With the commit 07bed44 now TST uses overflow/underflow events instead of ResizeObserver again if those events are available. Performance regression reported at here will go away until Firefox 128, but it is not a fundamental solution.

from treestyletab.

piroor avatar piroor commented on June 16, 2024

I've tried TST 4.0.15 + Firefox ESR 115.11.0 on Ubuntu 22.04 (on VirtualBox) but couldn't reproduce such a hanging. Could you collect a performance profile?
https://github.com/piroor/treestyletab/wiki/How-to-inspect-tree-of-tabs#how-to-collect-a-performance-profile

from treestyletab.

DarthGandalf avatar DarthGandalf commented on June 16, 2024

Not sure what has changed since yesterday, but it managed to load at all today, though slow. It's still 4.0.15

Firefox 2024-05-23 12.13 profile.json.gz

from treestyletab.

piroor avatar piroor commented on June 16, 2024

Thanks, I've realized that a change introduced to follow Firefox's change https://bugzilla.mozilla.org/show_bug.cgi?id=1897595 triggers the problem.

from treestyletab.

emilio avatar emilio commented on June 16, 2024

The issue is that you're synchronously determining the overflow state on connectedCallback(), the right thing to do is to just let the ResizeObserver callback be invoked once (it will be), or use requestAnimationFrame to batch the initial observations.

from treestyletab.

piroor avatar piroor commented on June 16, 2024

@emilio Hmm, the initial "overflow" state is required to know when the state is actually changed, so the synchronous operation

let lastOverflow = (
looks still required... and of course I already throttled detecting "overflow" state on every observations.
window.requestAnimationFrame(() => {

I can give up to determine the initial state but it looks to mean the initial resizing will be detected as "overflow" or "underflow" here

if (overflow === lastOverflow)
regardless the element's overflow state is actually changed or not.

from treestyletab.

piroor avatar piroor commented on June 16, 2024

Anyway this throttling may be effective to reduce needless style computations for tab elements inserted to the DOM tree and immediately removed by quick scrolling.
12359f7
@DarthGandalf Could you try the latest development build? https://github.com/piroor/treestyletab?tab=readme-ov-file#development-builds

from treestyletab.

DarthGandalf avatar DarthGandalf commented on June 16, 2024

I didn't really measure time, so can't compare whether it's faster than before. It at least finished loading, unlike yesterday :)

Firefox 2024-05-23 16.01 profile.json.gz

from treestyletab.

gotyaoi avatar gotyaoi commented on June 16, 2024

I had noticed a performance degradation (specifically when scrolling up in the list of tabs) on 4.0.15 (firefox 126, windows 11). The development build makes it much better, though perhaps slightly slower than before 4.0.15.

from treestyletab.

jayywolff avatar jayywolff commented on June 16, 2024

ive been able to reproduce this issue as well with only 70 tabs

on
Arch Linux x86_64
Firefox 126.0.1
TST 4.0.15

edit, i bookmarked my tabs, closed all of them, even cleared all site cookies/data.
and now even with just a single tab open here on github, TST just hangs and doesnt load at all.
Just showing a loading bar (that appears to be about 20% complete) and flickers every 10-15 seconds.

edit 2: found a workaround after struggling with this for a few days:

  • bookmark all your open tabs into a folder
  • downgrade to TST 4.0.14
  • disable auto-updates for TST
  • go to Firefox Settings -> General -> Startup
  • uncheck "Open previous windows and tabs"
  • restart firefox
  • Now TST should be working 😄
  • go to Firefox Settings -> General -> Startup
  • check "Open previous windows and tabs"
  • now restore your bookmarks folder if needed

@piroor looks like you added backward compatibility as a workaround already, when can we expect a TST update including 07bed44

from treestyletab.

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.