Earlier quoted context omitted.
False dilemma. You can have both. It's okay if a fully optimized release mode binary takes a bit longer to compile, but compiling a few million lines of code for a debug build shouldn't take more than a second or two. Also consider the leverage factor. Improvements to the compiler benefit all users of the programming language, so it's worthwhile to invest in high quality compilers.
> You can have both. It's okay if a fully optimized release mode binary takes a bit longer to compile, but compiling a few million lines of code for a debug build shouldn't take more than a second or two. > You can have both. Pretty bold claim, without proof.
24-core CPU and I can’t move my mouse
341–350 of 509 posts
Re: 24-core CPU and I can’t move my mouse
#342Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…
I think large parts of chrome actually belong into the OS. The network parts, the drawing library (skia), the crypto implementation, the window and tab management, and so on.
The javascript engine could be factored out, too, so more apps could benefit from it (without bundling a whole frickin Chromium).
Video and audio would be deferred to DirectShow, Quartz, VLC, Mplayer, ...
Ideally, what remains is just a layout engine and some glue code for the UI. It's the monolithic kernel vs microkernel debate all over again.
Plugins have a bad rep in the context of browsers, but I think this "microkernel browser" where everything is a plugin or OS library can be potentially more secure than the current state, since we can wall off the components between interfaces much better.
I also think it would be much "freer". Browsers like Firefox and Chrome are open-source, but they are free in license only. I can't realistically go ahead and make my own browser. The whole thing is so complex that you have to be Google or Apple or Microsoft to do that. The best I could achive is a reskin of WebKit. I think that would be different with a more modular browser.
Re: 24-core CPU and I can’t move my mouse
#343Earlier quoted context omitted.
> Damn, are we doing this wrong? Yes: Not isolating different modules sufficiently to allow you to avoid including most headers when compiling most modules. Patterns to do this in C++ has been well understood for two decades: Strict separation of concerns coupled with facades at the boundaries that let all the implementation details of the modules remain hidden. Yes, it has a cost: You're incurring extra call overhea…
Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games.
They're relying on the compiler working its magic to make non-hand-optimized code run pretty fast. That's fine, but it requires you to expose a lot of stuff in headers and that slows down compilation.
I'm fairly sure, like other commenters, that they could speed up compilation a lot and impact performance very little by carefully modularizing their header files. But that's a really big job.
Re: 24-core CPU and I can’t move my mouse
#344Earlier quoted context omitted.
False dilemma. You can have both. It's okay if a fully optimized release mode binary takes a bit longer to compile, but compiling a few million lines of code for a debug build shouldn't take more than a second or two. Also consider the leverage factor. Improvements to the compiler benefit all users of the programming language, so it's worthwhile to invest in high quality compilers.
In what language can we have both? Yes, we can use caching compilers ( https://wiki.archlinux.org/index.php/ccache ) to speed up builds with few changes. We can lower optimization levels (although that barely gives you an increase in compile speed compared to the runtime speed you lose and the fact that it makes your program do slightly different things). There's no slider from "pessimum" to "optimum". You need to do…
Have you actively tried to find one?
Re: 24-core CPU and I can’t move my mouse
#345Earlier quoted context omitted.
> How did we get here? Well, C++ and its stupid O(n^2) compilation complexity [...] Wasn't large compilation time a driving force behind coming up with Go? Is a garbage-collected language not suitable for a web browser? I am just curious because I absolutely love writing Go
> Wasn't large compilation time driving forces behind writing Go yes, that was one of the tenants. > Is a garbage-collected language not suitable for a web browser? In theory its fine; but there's a lot of historical baggage that comes along with garbage collection and the majority of languages that support it (e.g. almost no value types). Golang fairs pretty well latency wise for a GC'd language. I'd be curious for…
With the exception of Smalltalk and its derivatives, all the GC enabled languages that came before Java had value types, even Lisp.
Re: 24-core CPU and I can’t move my mouse
#346Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…
I built Mozilla on my PowerBook G4 and it was still going 24 hours later :D Ah, good memories.
Re: 24-core CPU and I can’t move my mouse
#347Earlier quoted context omitted.
I mean the trackpad issue is generally down to the manufacturer and the drivers they provide, but I take your point otherwise. A pro tip with 7z is to use the two pane interface to extract and not dragging files to Explorer. The latter option extracts the files to a temp directory before copying them whereas the former extracts directly to the destination. The Windows file systems are pretty cruddy in general though…
> A pro tip with 7z is to use the two pane interface to extract and not dragging files to Explorer. The latter option extracts the files to a temp directory before copying them whereas the former extracts directly to the destination. That's insane. I had no idea. Thanks for the tip!
Re: 24-core CPU and I can’t move my mouse
#348It does feel like there's something seriously wrong with the massive C++ codebases we use these days for key infrastructure like browsers, and the massive compilation times we put up with.
Re: 24-core CPU and I can’t move my mouse
#349Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…
Heh. I was reading about the origins of Golang and how Rob Pike and Robert Griesemer were waiting 3 hours or something for a C++ build to finish. And with that much time available - might as well make a brand new language that has compilation speed as a first-class feature. Are we doing it wrong? In the case of C++ - yes, absolutely, 100% certainly, wrong. I'm not suggesting that Chrome would be better off under Gola…
Any C++ replacement needs the love of Apple, Microsoft, IBM, HP, Google and everyone else that sells operating systems.
Re: 24-core CPU and I can’t move my mouse
#350Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…
That violates encapsulation. Getters should be rare and setters almost non-existent.