News for hackers. Stuff that matters.
Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @01:11PM (#15074396)
I have similar concerns. I'm all for using my machine to its fullest, but in large, applications like web browsing should be an additional thing I am doing on my computer, not something that thinks it can take the full computer.

Though, I have to admit I am also a little torn on this. Yes, browsing is typically done "during compile" or some other task. However, I have also begun doing most of that work remotely so that I can save battery on my laptop. To that end, it is now less of a concern on preserving cores for my tasks that actually need it.

Re:Inside a fast CSS engine by pcwalton on Tuesday August 22, 2017 @04:06PM (#15075916)
This problem is the responsibility of the OS scheduler. One of the most important goals of any scheduler should be to give foreground UI processes that spend a lot of time sleeping in event loops priority. So if your OS scheduler is properly designed (as the ones in all major OS's are) a threaded browser shouldn't interfere with the system's responsiveness.
Re:Inside a fast CSS engine by matthewmacleod on Tuesday August 22, 2017 @01:17PM (#15074455)
If that’s what you want to do, the you should ‘nice’ your web browser (or use whatever priority mechanism your environment had available). Artificially limiting performance is absolutely the wrong approach!
Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @01:27PM (#15074560)
It isn't artificially limiting. If my browser didn't need all of my cores to perform, we wouldn't be having this discussion. :)

And I seriously question whether my browser needs this to perform well. I am not completely closed to the idea, but I am highly skeptical.

Re:Inside a fast CSS engine by matthewmacleod on Tuesday August 22, 2017 @03:41PM (#15075701)
The fact that it's been done is some evidence that it's required. If it weren't, it's hard to imagine why limited resources would be wasted on it!

Almost every modern device running a browser has multiple cores, and that trend is almost certainly going to increase – so it definitely feels like allowing a core part of the web platform to expand across cores will be beneficial.

Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @04:00PM (#15075849)
I challenge that. That it was done is as much evidence that it was doable as that it was required.

It is also a bloat race. Web pages are getting increasingly complicated. With very little benefit to end users. I'd wager a growing number of the cycles and network requests are going to tracking, nowdays. Not to mention the ui language doing more and more contortions to give us a page that could be much more succinctly described.

None of this is to say I want it stopped. I just have a feeling of concern that this is leading to an ever increasing march to faster and faster machines to do basic work.

Re:Inside a fast CSS engine by moosingin3space on Tuesday August 22, 2017 @02:01PM (#15074889)
Do you have a similar concern for all multithreaded programs?
Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @02:43PM (#15075267)
In general, yes. That my computer can do many things is something I take advantage of as a user. The programs should use them to their advantage, but by and large, most programs do not need all of the processing capabilities of my computer, so I expect they should play well together. (Indeed, it takes effort to get the GPU of my computer to help out with anything.)
Re:Inside a fast CSS engine by rhencke on Tuesday August 22, 2017 @02:52PM (#15075339)
This is the job of your operating system's scheduler - to divide the limited resource of your computer's CPU time among different competing tasks.

In the modern era, a program cannot take more than its fair share of CPU time - otherwise, a runaway program could easily render your computer nearly unusable. (Linux, macOS and Windows all use preemptive multitasking.)

The way to tell your operating system what you desire prioritized is, on *nix systems, 'nice'.

Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @02:57PM (#15075374)
I'm well aware of that. I also know that, in general, having to schedule things slows them down. If everything I'm running is trying to schedule something on my entire machine, it is giving my OS more work. Which will, by necessity, be harder to schedule and slow things down.

I'm not necessarily against all of this, but I'm also not eagerly embracing more crap to slow down my machine for no apparent reason.

Re:Inside a fast CSS engine by demarq on Tuesday August 22, 2017 @04:39PM (#15076160)
You are assuming that your OS scheduler is nearly at capacity, it isn't. And moreover your CPU is will spend most of it's life idle.

I could almost guarantee you this is not the bottleneck of any modern setup.

Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @05:58PM (#15076729)
I can guarantee you that I have jumped over to my browser when doing a compile that is definitely limited by my machine. I'm ok doing this knowing that I will only take up so much work on my machine. I do not go off and kick off another giant compile at the same time.

Now, if the browser becomes more and more consuming, hitting my browser could get closer and closer to kicking off another giant compile.

Re:Inside a fast CSS engine by tedmielczarek on Tuesday August 22, 2017 @03:30PM (#15075630)
Keep in mind that by parallelizing work the browser can finish the work it's doing faster, which means your CPU can spend more time idle, which is better for power consumption.
Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @06:00PM (#15076737)
That is a big "ostensibly" there. Hard data showing this would be somewhat nice.

And, as others, you are also assuming I was not pegging out my machine doing something by choice.

Re:Inside a fast CSS engine by lkbm on Tuesday August 22, 2017 @07:39PM (#15077263)
Metajack mention power usage with parallelization briefly here[0], but doesn't provide the data.

[0] https://youtu.be/7q9vIMXSTzc?t=35m (2015)

Re:Inside a fast CSS engine by taeric on Tuesday August 22, 2017 @08:27PM (#15077511)
To be clear, the reasoning is sound on this argument. I'm skeptical due to it never having delivered data, though. :(

I want it to be true. I expect that someone should be able to show this with data. I've never seen it done, though.

Re:Inside a fast CSS engine by noch on Wednesday August 23, 2017 @06:19AM (#15080136)
You can collect much of this data for yourself on a GNU Linux system by using the cgroups feature of the Linux kernel which is more powerful than nice https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.t... .

Using the various CPU* options, you can turn on CPUAccounting, pin a given process and its children/threads to a range of CPUs, place CPUQuotas and so forth. There's a lot of power and granularity there.

I know, anecdotally, that devops/sysadmin folk use this to also audit and test energy consumption of processes over time. (Certain popular PID 1 programs have a run tool that allows you to easily, dynamically change and audit process resource usage.)

My typical use case, for instance, is auditing and managing various Emacs' processes lifetimes while running potentially racy elisp code.

Re:Inside a fast CSS engine by taeric on Wednesday August 23, 2017 @11:01AM (#15082001)
I know the data can be gathered. Could go even more direct and measure power usage of the computer before and after the upgrade.

It would be nice if everyone pushing some of these would collect some data for their claims, though. Especially if any of them have better setups (read: more than the single machine I have).