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

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
Project founder
Project founder
Posts: 38821
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Timer resolution change by websites

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)
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"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

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