Timer resolution change by websites

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

fipsy

Timer resolution change by websites

Unread post by fipsy » 2020-04-02, 21:10

Hi!

I have noticed that many websites (e.g. ebay or WhatsApp Web) increase the Windows system timer resolution from 15 ms to 1 ms. I wonder if there is any reason at all for any website to request such a high resolution, especially since the latency times on the web are much higher anyway. In addition, such a high resolution undermines the energy options of the system and regularly causes an increased energy consumption. Another problem is that the high resolution is not reversed when the tab that requested the resolution change is closed. The system remains in the high resolution until the entire browser is closed. This is all VERY nasty!

Is it really necessary for websites to request 1 ms resolution? If not, couldn't this simply be prevented? Or at least blocked on request via a global setting? But anyway, the resolution should at least be undone when closing the corresponding tab.

Thanks a lot and many greetings, Volker

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35577
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Timer resolution change by websites

Unread post by Moonchild » 2020-04-03, 13:34

Not sure why you originally posted this in the Basilisk board because something like this would (obviously) not be application-specific but platform-wide.

Thanks for raising this point though. It does look like we're setting these high precision timers a bit too often. Tracking in Issue #1507 (UXP)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fipsy

Re: Timer resolution change by websites

Unread post by fipsy » 2020-04-14, 04:02

Moonchild wrote:
2020-04-03, 13:34
Not sure why you originally posted this in the Basilisk board because something like this would (obviously) not be application-specific but platform-wide.
Thanks a lot! Sorry for posting it on the basilisk board. I was not aware that it is a problem that not only affects Basilisk.
Thank you very much for reviewing this thing!

Cheers, Volker

Locked