Smooth Scrolling optimization wanted! (Quartz Extreme / Core Image)

LinkCRG's Avatar

LinkCRG

29 Nov, 2016 01:51 AM

Hi developers,

first of all, thanks for a great and up-to-date browser for MacOS 10.5.8, a project of class and incomparable.
What i liked to point out ever, is the fact that TenFourFoxG5 seems to consume a huge unnecessary amount of CPU time when scrolling content.
The latest original 'Safari' browser compares similar (but seems a bit faster).
My main consideration is: Couldn't it be possible to use Apple 'Quartz Extreme' or 'Core Image' to hardware-accelerate *something*?
I think that even without hardware acceleration by using some sort of intelligent MMU refresh it could do better.
Even with the fastest available PPC970mp cores (4x @2,5GHz) TenFourFoxG5 moves like a tank; a simple usual tablet-device does better, which is significant.
It's nice to see you did some AltiVec optimizations, which is the key to unleash the PowerPC's performance.
AltiVec needs to be fed properly to boost, hard work for sure.
The option in about:preferences#advanced 'use hardware acceleration if available' or 'smooth scrolling' doesn't seem to do anything good, in my opinion this deserves to be reviewed. I expect a high possible gain here.

I have a very fast hardware video accelerator GPU in my G5 Quad, see (sorry German text):
ATI Radeon X1900 XT:

  Chipsatz-Modell: ATY,RadeonX1900
  Typ: Monitor
  Bus: PCIe
  Steckplatz: SLOT-1
  PCIe-Lane-Breite: x16
  VRAM (gesamt): 256 MB
  Hersteller: ATI (0x1002)
  Geräte-ID: 0x7240
  Versions-ID: 0x0000
  ROM-Version: 113-A52070-109
  Monitore:
FS2333:
  Auflösung: 1920 x 1080
  Farbtiefe: 32-Bit Farbe
  Core Image: Hardware-unterstützt
  Hauptmonitor: Ja
  Synchronisierung: Aus
  Eingeschaltet: Ja
  Quartz Extreme: Unterstützt
  Rotation: Unterstützt
Monitoranschluss:
  Status: Kein Monitor angeschlossen

If you've ever had tinkered with „Core Image Fun House“ you can get an impression of how fast
this graphics-accelerator truely is, but even a stock GeForce 6600 with hardware support could do best.
TenFourFox(G5) has a remarkable overhead when scrolling. Please fix that, and use dedicated hardware horse power
whenever applicable, please.
It would be very nice to hear some response from you, i like your doing very much and wish you all the best.
I'm a happy MacOS PowerPC user from Germany.

Best Regards
Link

  1. Support Staff 1 Posted by Cameron Kaiser on 29 Nov, 2016 04:57 AM

    Cameron Kaiser's Avatar

    The hardware support in Firefox requires OpenGL that supports NPOT texture sizes (2.0 and up). Since TenFourFox is based on the 10.4 SDK, which is OpenGL 1.2, this is not possible with Gecko's current architecture. Changing this dependency would require substantial refactoring and is not something I plan to do. Currently any hardware acceleration is internal to whatever CoreGraphics supports; everything else, including scrolling, is software. For that reason, as you've noticed, the hardware acceleration options are currently do-nothing and I will probably simply remove them in a future version.

    Quartz Extreme is a function of the window manager, not individual applications. It wouldn't help this problem and would almost certainly already be enabled for your system. (It is on mine; this is a quad G5 with a Quadro and 10.4.11.)

    That said, on the quad G5 I'm typing this on, I don't see major CPU utilization from simply scrolling the window in general, but I never have smooth scrolling enabled and I don't ship the browser that way. Note that some image-heavy sites or pages with complex layouts are worse than others, and you should be aware that part of the scrolling overhead involves checking and freeing images from the display that are no longer visible to reduce memory usage. There is a backport coming to 45.6.0 that will help this somewhat but I don't think it will help what you're describing here. If you have large load scrolling windows even with smooth scrolling off, something else is going on.

  2. Support Staff 2 Posted by Chris (chtrusch... on 29 Nov, 2016 04:49 PM

    Chris (chtrusch)'s Avatar

    Just a thought: Provided a working toolchain for compiling and linking existed on 10.5, would a port of the last 10.6-compatible Firefox to PPC 10.5 (without 10.4 compatibility) be able to utilise 10.5's OpenGL/WebGL and CoreText and use the existing AltiVec optimizations from TenFourFox?

  3. Support Staff 3 Posted by Cameron Kaiser on 29 Nov, 2016 05:11 PM

    Cameron Kaiser's Avatar

    It's certainly more possible. Tobias Netzel did something like this with AuroraFox, but he stopped around Fx20. Mozilla has a block in the source code to prevent WebGL usage on 10.5 due to security issues (leaking memory and device contexts), but it did generally work with the block disabled, at least at that time.

    Somebody Else(tm) would have to do this, though. I don't use 10.5 on most of my systems and I don't have any 10.5 development systems. This would be a completely different product. I'd be willing to offer advice to someone willing to do so, but I can't do it myself.

    I should clarify one thing: there is OpenGL usage in TenFourFox, but on a very minimal level. Since Australis landed the main window context is a single OpenGL surface and CoreGraphics draws into it (see bugs 625989, 676241 and 1180688, the latter being essentially what TenFourFox does). This is completely separate from OpenGL acceleration which turns layers into OpenGL surfaces, and those do require NPOT texture sizes.

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