

I could say precisely the same about standard pencils – you have to constantly be sharpening it if you want properly dense handwriting. Mechanical with .2 or .3 and you don’t even have to rotate it to get a sharp edge.
I could say precisely the same about standard pencils – you have to constantly be sharpening it if you want properly dense handwriting. Mechanical with .2 or .3 and you don’t even have to rotate it to get a sharp edge.
1st one, with either .2 or .3 lead. That also happens to be what I main for writing already.
Yep, precisely.
It’s also quite literally one of the recommended methods of installation for e.g. UHB, for which there’s even a pre-made script in the repo.
Edit: Also, Chromium devs are aware of this use case and have even added optimizations for it in the past, as visible in the highlighted comment. And the max hosts file size defaults to 32 MiB which is well over the size I’m using (24 MiB). Makes it even weirder for it to bog down completely when experimenting with a ~250 MiB hosts file, as it should just reject it outright according to implementation.
Don’t seem to be any disk reads on request at a glance, though that might just be due to read caching on OS level. There’s a spike on first page refresh/load after dropping the read cache, so that could indicate reading the file in every time there’s a fresh page load. Would have to open the browser with call tracing to be sure, which I’ll probably try out later today.
For my other devices I use unbound hosted on the router, so this is the first time encountering said issue for me as well.
You’re using software to do something it wasn’t designed to do
As such, Chrome isn’t exactly following the best practices either – if you want to reinvent the wheel at least improve upon the original instead of making it run worse. True, it’s not the intended method of use, but resource-wise it shouldn’t cause issues – at this point one would’ve needed active work to make it run this poorly.
Why would you even think to do something like this?
As I said, due to company VPN enforcing their own DNS for intranet resources etc. Technically I could override it with a single rule in configuration, but this would also technically be a breach of guidelines as opposed to the more moderate rules-lawyery approach I attempt here.
If it was up to me the employer should just add some blocklist to their own forwarder for the benefit of everyone working there…
But guess I’ll settle for local dnsmasq on the laptop for now. Thanks for the discussion 👌🏼
TLDR: looks like you’re right, although Chrome shouldn’t be struggling with that amount of hosts to chug through. This ended up being an interesting rabbit hole.
My home network already uses unbound with proper blocklist configured, but I can’t use the same setup directly with my work computer as the VPN sets it’s own DNS. I can only override this with a local resolver on the work laptop, and I’d really like to get by with just systemd-resolved
instead of having to add dnsmasq
or similar for this. None of the other tools I use struggle with this setup, as they use the system IP stack.
Might well be that chromium has a bit more sophisticated a network stack (than just using the system provided libraries), and I remember the docs indicating something about that being the case. In any way, it’s not like the code is (or should be) paging through the whole file every time there’s a query – either it forwards it to another resolver, or does it locally, but in any case there will be a cache. That cache will then end up being those queried domains in order of access, after which having a long /etc/hosts
won’t matter. Worst case scenario after paging in the hosts file initially is 3-5 ms (per query) for comparing through the 100k-700k lines before hitting a wall, and that only needs to happen once regardless of where the actual resolving takes place. At a glance chrome net stack should cache queries into the hosts file as well. So at the very least it doesn’t really make sense for it to struggle for 5-10 seconds on every consecutive refresh of the page with a warm DNS cache in memory…
…or that’s how it should happen. Your comment inspired me to test it a bit more, and lo: after trying out a hosts file with 10 000 000 bogus entries chrome was brought completely to it’s knees. However, that amount of string comparisons is absolutely nothing in practice – Python with its measly linked lists and slow interpreter manages comparing against every row in 300 ms, a crude C implementation manages it in 23 ms (approx. 2 ms with 1 million rows, both a lot more than what I have appended to the hosts file). So the file being long should have nothing to do with it unless there’s something very wrong with the implementation. Comparing against /etc/hosts
should be cheap as it doesn’t support wildcard entires – as such the comparisons are just simple 1:1 check against first matching row. I’ll continue investigating and see if there’s a quick change to be made in how the hosts are read in. Fixing this shouldn’t cause any issues for other use cases from what I see.
For reference, if you want to check the performance for 10 million comparisons on your own hardware:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
int main(void) {
struct timeval start_t;
struct timeval end_t;
char **strs = malloc(sizeof(char *) * 10000000);
for (int i = 0; i < 10000000; i++) {
char *urlbuf = malloc(sizeof(char) * 50);
sprintf(urlbuf, "%d.bogus.local", i);
strs[i] = urlbuf;
}
printf("Checking comparisons through array of 10M strings.\n");
gettimeofday(&start_t, NULL);
for (int i = 0; i < 10000000; i++) {
strcmp(strs[i], "test.url.local");
}
gettimeofday(&end_t, NULL);
long duration = (end_t.tv_usec - start_t.tv_usec) / 1000;
printf("Spent %ld ms on the operation.\n", duration);
for (int i = 0; i < 10000000; i++) {
free(strs[i]);
}
free(strs);
}
Thanks for the suggestion – I’ll have to give a try to the ungoogled version.
Per text and per minute plans were the norm at least here for a long time, I had one until mid 2010’s IIRC. A single text cost something like 0.069 €. Parents kept their kids from overspending with prepaid plans, which were the norm for elementary students. In Europe people typically don’t pay to receive calls, so your parents could still call you even if you ran out of phone credits.
We got unlimited data plans before widespread unlimited texting, which meant people mostly stopped texting by early 2010’s. I remember my phone plan getting unlimited 3g in 2010 for 0.99 €/month (approx 1.40 $ back then), albeit slow AF (256 kbps). Most switched to e.g. Kik or later WhatsApp after that.
Probably varies a lot based on where you grew up. I got my first phone when I was 9, in 2006, and was among the last in my class to get one. Though phone plans were really cheap by then in Finland, partially due to the largest phone manufacturer (back then) Nokia being Finnish, and our telecom operators being in tight competition. (We’ve three separate carriers with country wide networks, as was the case back in the early 2000’s as well)
I’d say the turning point here was 2003 when Nokia launched the model 1100, which was dirt cheap. I vaguely remember the price eventually falling as low as 19 € in a sale, at which point the phone cost about the same as your typical phone plan per month.
Mayonnaise on pizza is surprisingly common in Finland, e.g one local pizzeria near me puts garlic mayo on certain pizzas – enough that there’s more mayo than tomato sauce. For some incomprehensible reason they also put the mayo under the cheese. As you can guess, it was repulsive. However, BBQ sauce and bacon pizza is a nice combination, which is also normal here.
Truffle mayo did work in some pizzas, in moderation.
That, or the system has a transparent lockout, where if you type your password wrong for e.g. 3 times it’ll stop accepting new tries for a specific duration to stop people trying to guess the password. I’ve run into this type of brute forcing prevention multiple times, though IMO the correct approach would be 2FA coupled with proper passwords instead.
For local usage on linux there’s virt-manager, has been good enough for my use at least, and the integrated spice client has relatively good graphics performance for normal desktop use.
Edit: don’t know about a good gui for running qemu on windows, though
I find it funny how whoever originally created this meme somehow ended up using a picture of Macintosh II (or IIx, IIfx) to represent a computer. An over 30 yo mahcine, which while capable of speech synthesis is not going to talk to you without being requested, unless you’ve configured something very incorrectly.
Feels a bit like a floppy disk still being the save icon; computers are still being presented with floppy drives and a CRT monitor in clip-art and such.
And we’ve nowadays taken it even further, in spoken Finnish we’ve even got rid of the “hän” and mostly use “se”, which is the Finnish word for “it”. The same pronoun is used for people in all forms, animals, items, institutions and so on, and in practice the only case for “hän” is people trying to remind others they consider their pets human.
Context will tell which one it is.
Cray (the company) often had interesting designs that probably ended up influencing a lot of sci-fi. CDC (control data corporation) had interesting designs as well, prior to that, and Cray (the person) worked there before founding his own company.
One other supercomputer line with iconic looks is Connection Machines which are IMO some of the coolest looking computers ever made.