Re: [PATCH, v10 3/3] cgroups: introduce timer slack controller

From: Arjan van de Ven
Date: Mon Oct 17 2011 - 10:35:46 EST


On 10/17/2011 7:28 AM, Peter Zijlstra wrote:
Or even when I minimize firefox. That said, ff will probably crash as soon as I open a second tab because the retarded thing will very likely continue animating everything on the invisible tab anyway. You could start by making the X lib of the day, is that XCB these days?, issue an error print (you get plenty of those anyway) and progress to full on crashing later. This gives developers a migration window and incentive to fix up their apps.

so back in the time that worked on a project that used Qt as their toolkit (geez is it that long ago already ;-) )... we fixed Qt to stop doing this.
The right level for this sort of thing is the toolkit level (which by and large also does the animations), not Xlib.
The toolkit level also will then need to provide the right notifications to the app for things the toolkit does not do
(eg "we're at least partially visible" versus "now none of our pixels are on the screen").

It ended up being a thing for the toolkit and a minor tweak in the compositor... and it worked quite ok, the app guys actually
asked for the API (because they knew I would beat them up for getting it wrong)...

doing things on the xlib level (or even X level) means you take away the chance for the App(tm) to do things the right way;
make it easy for the app, not hard.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/