Where’s all my CPU and memory gone? The answer: Slack
-
@dreikin said in Where’s all my CPU and memory gone? The answer: Slack:
Perhaps we should make our own chat program? WTChat?
As long as it's made in the spirit of the OMGWTF...
Actually that would be a really good contest, since the programs would have to be interoperable, but the protocol could be defined in a pretty loose way, so people would have to come up with terrible hacks to make up for other people's terrible hacks...
-
@anonymous234 what is wrong with the jabber protocol?
-
@powerlord said in Where’s all my CPU and memory gone? The answer: Slack:
@e4tmyl33t It's gotten to the point where I have an application installed named X-Mouse Button Control specifically that can block badly behaving programs from intercepting said mouse button.
I've run into far too many apps/games that grab the Mouse 4 button and force it to be treated as Back and don't actually provide a way to disable it. Even games that let you adjust keybindings; Mouse4 and the Esc key are basically the only buttons they don't let you rebind.
Honestly, it's not that it's capturing the key (though I do have to run Discord as admin to even get it to work with some games because of the way they launch), it's that somehow the game makes Discord's UI occasionally lag like shit, especially if it's not in the foreground on one of my monitors. Somehow my voice still goes through, but sometimes I'll just get a blast of push-to-talk activation sounds all at once, or it'll sound like it's dropped and reconnected me to the voice channel, despite it not having actually done so.
It's the only game I've ever come across that Discord acts like this with. I blame Ubisoft.
-
@sloosecannon said in Where’s all my CPU and memory gone? The answer: Slack:
@raceprouk said in Where’s all my CPU and memory gone? The answer: Slack:
@sloosecannon said in Where’s all my CPU and memory gone? The answer: Slack:
Which is hilarious, because Discord is also one, and doesn't have the same performance issues!
it has different ones
That's fair. Although I haven't noticed much of an issue with it. Unless I'm running it in my crappy Windows 10 tablet with 2 gigs of RAM
Most annoying problem I have at the moment: Moving the window requires you to hit a 20px high hitbar:
It would be fine, except it's not obvious that that's the expectation, and I keep on trying to drag it by the rest of the header and instead and up doing shit like this:
-
@wharrgarbl said in Where’s all my CPU and memory gone? The answer: Slack:
@sloosecannon said in Where’s all my CPU and memory gone? The answer: Slack:
Unless I'm running it in my crappy Windows 10 tablet with 2 gigs of RAM
It's ridiculous some chat app requiring something with gigs of RAM. mIRC used to run in machines with a few MB
It's not the chat app that requires gigs of RAM. It's the system itself. When it's that memory-starved, anything puts it over the top...
-
@tsaukpaetra said in Where’s all my CPU and memory gone? The answer: Slack:
@sloosecannon said in Where’s all my CPU and memory gone? The answer: Slack:
@raceprouk said in Where’s all my CPU and memory gone? The answer: Slack:
@sloosecannon said in Where’s all my CPU and memory gone? The answer: Slack:
Which is hilarious, because Discord is also one, and doesn't have the same performance issues!
it has different ones
That's fair. Although I haven't noticed much of an issue with it. Unless I'm running it in my crappy Windows 10 tablet with 2 gigs of RAM
Most annoying problem I have at the moment: Moving the window requires you to hit a 20px high hitbar:
It would be fine, except it's not obvious that that's the expectation, and I keep on trying to drag it by the rest of the header and instead and up doing shit like this:
I've given up on trying to and just use the +arrow keys
-
@alexmedia Clippy jokes. So timely. It's only been gone, what, 15 years?
-
@wharrgarbl said in Where’s all my CPU and memory gone? The answer: Slack:
what is wrong with the jabber protocol?
Apart from the fact that it is using streaming XML fragments as a framing protocol on top the underlying channel? Not much; XMPP is moderately sane. (I'm less certain about the Jabber messaging protocol that sits on top of that; I stopped reading the protocol specs before getting to that point. ;))
-
@wharrgarbl said in Where’s all my CPU and memory gone? The answer: Slack:
@anonymous234 what is wrong with the jabber protocol?
You're right, an XML based network protocol already has all the WTFs we need.
-
@anonymous234 Hey, a networked software of mine uses compressed XML in its payloads!
(but because I like protocols that make sense, it's only in the payload: What carries them is binary with a fixed-size header that contains the length of the payload, so the length field has a fixed size because seriously, who uses a variable-length length field?)
-
Not sure if this was pointed out before, but this guy works for a company that markets a competing product - "Co-founder of Ably: Simply better realtime messaging". Kind of taints the whole post for me.
-
@arantor said in Where’s all my CPU and memory gone? The answer: Slack:
This is why I stick to the website which doesn't have this bullshit nearly so badly.
There is (was?) a weird bug with Chrome and Firefox on Linux where Slackbot would not offer to invite someone you @mention in a channel who wasn't already present, but it works fine in other systems and in the Linux client. That's the only reason why I installed it!
My company actually pays for Slack: it's made itself a major part of many workflows in all departments. So it's kind of mandatory.
-
@zemm yeah, my current company pays for Slack too, but I still don't use the desktop client...
-
@arantor said in Where’s all my CPU and memory gone? The answer: Slack:
but I still don't use the desktop client...
It's not too bad...
-
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@anonymous234 Hey, a networked software of mine uses compressed XML in its payloads!
(but because I like protocols that make sense, it's only in the payload: What carries them is binary with a fixed-size header that contains the length of the payload, so the length field has a fixed size because seriously, who uses a variable-length length field?)The linked article says nothing about variable-length length fields AFAICS. (Granted, it was based on a cursory search for the word "length", but... yeah. That didn't turn up anything relevant.)
-
The
Content-Length
header value is specified as an ASCII digit string of any length.
-
@twelvebaud said in Where’s all my CPU and memory gone? The answer: Slack:
The
Content-Length
header value is specified as an ASCII digit string of any length.I wonder if anyone's written an attack that just sense an extreme content length header...
-
@twelvebaud said in Where’s all my CPU and memory gone? The answer: Slack:
The
Content-Length
header value is specified as an ASCII digit string of any length.That, and the header itself has a variable, non-prefixed length, and the
Content-Length
field doesn't have a fixed offset either. HTTP is hell.
-
@medinoc only if you make assumptions about it. If you work with it every day, it just becomes mildly annoying.
I can't wait to see how Mason thinks it should be done.
-
@twelvebaud
Like cold calls, if you haven't got it in the first say 2kb of header, then hang up the phone.
-
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@twelvebaud said in Where’s all my CPU and memory gone? The answer: Slack:
The
Content-Length
header value is specified as an ASCII digit string of any length.That, and the header itself has a variable, non-prefixed length, and the
Content-Length
field doesn't have a fixed offset either. HTTP is hell.You're not even guaranteed to get
Content-Length
. Options are:- Message cannot have a body (GET, HEAD, response to HEAD, 101, 204, 304)
Transfer-Encoding: chunked
, where each chunk has its own length specifier (octal digit string). Terminated by a zero-length chunk.- Aforementioned
Content-Length
Content-Type: multipart/byteranges
, which implies body length. I believe online viewing of large PDF documents uses this?- By the server closing the connection.
Those are ordered. I'm pretty sure the spec allows for a content length specifier indicating the length of the body that would have been sent, but isn't because the request was HEAD.
-
At least HTTP2 has dropped all this madness and made it much easier to implement the spec. Right?
...right?
-
@lb_ said in Where’s all my CPU and memory gone? The answer: Slack:
At least HTTP2 has dropped all this madness and made it much easier to implement the spec. Right?
...right?
Well it has a record layer to interleave exchanges, so I'd expect that replaces most of the length shenanigans? I'm not sure offhand how well they've fixed header shenanigans.
-
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@twelvebaud said in Where’s all my CPU and memory gone? The answer: Slack:
The
Content-Length
header value is specified as an ASCII digit string of any length.That, and the header itself has a variable, non-prefixed length, and the
Content-Length
field doesn't have a fixed offset either. HTTP is hell.I don't see why that's a huge problem. When you're working at the application layer, you have the tools to handle headers that are ASCII text separated by line breaks. HTTP is a bit different than Ethernet.
-
@tsaukpaetra said in Where’s all my CPU and memory gone? The answer: Slack:
I wonder if anyone's written an attack that just sense an extreme content length header...
Yeah, tons of times. There used to be gobs of attacks that relied on browsers allocating tons of memory via. lying headers.
-
@dcon said in Where’s all my CPU and memory gone? The answer: Slack:
@arantor said in Where’s all my CPU and memory gone? The answer: Slack:
but I still don't use the desktop client...
It's not too bad...
That's 325 MiB of RAM being used by a fucking IM client. If that's "not too bad" then I don't know what is.
-
@alexmedia said in Where’s all my CPU and memory gone? The answer: Slack:
That's 325 MiB of RAM being used by a web browser pretending to be a fucking IM client.
FTFY ;)
-
@alexmedia Quite a range of sizes, too. Does the 16 K process only keep track of the username or what?
-
@hungrier said in Where’s all my CPU and memory gone? The answer: Slack:
@alexmedia Quite a range of sizes, too. Does the 16 K process only keep track of the username or what?
That's for the application icon in the taskbar, probably.
-
@hungrier It's the process that just start all the other ones
-
@timebandit said in Where’s all my CPU and memory gone? The answer: Slack:
@hungrier It's the process that just start all the other ones
Rather like chrome with 13 tabs open:
-
@dcon said in Where’s all my CPU and memory gone? The answer: Slack:
Rather like chrome with 13 tabs open:
I have currently 80 tabs open
-
@dcon Speaking of Chrome, Shift+Esc is my favorite tool for finding which website is hogging all my memory. For some reason YouTube playlists had a leak the last couple weeks and would slowly ratchet up the CPU and RAM usage for no reason until your machine started to lag.
-
-
-
@lb_ I've gotten in the habit of closing all programs when going home at night. Fixes those browser leaks. And protects against reboots! (actually, my machine will hang in that case - need a USB key because of BitLocker)
-
@dcon in my case the leaks get bad in a matter of a few hours, rather than days. I don't let my machine run more than 12-24 hours.
-
@timebandit said in Where’s all my CPU and memory gone? The answer: Slack:
@dcon said in Where’s all my CPU and memory gone? The answer: Slack:
Rather like chrome with 13 tabs open:
I have currently 80 tabs open
That's all?
Filed under: 476
-
@lb_ said in Where’s all my CPU and memory gone? The answer: Slack:
@dcon in my case the leaks get bad in a matter of a few hours, rather than days. I don't let my machine run more than 12-24 hours.
Filed under: Update time!
-
@lb_ said in Where’s all my CPU and memory gone? The answer: Slack:
@dcon Speaking of Chrome, Shift+Esc is my favorite tool for finding which website is hogging all my memory. For some reason YouTube playlists had a leak the last couple weeks and would slowly ratchet up the CPU and RAM usage for no reason until your machine started to lag.
Google Drive does that for me too. 😵
-
@tsaukpaetra said in Where’s all my CPU and memory gone? The answer: Slack:
Google Drive
I tried to move about 800 photos on Google Drive to their own folder. The browser tab hung for about 5 minutes before finally starting to do stuff
-
@jaloopa I have no idea how they managed to take an operation that happens instantly on my laptop and make it take magnitudes longer
-
@bb36e said in Where’s all my CPU and memory gone? The answer: Slack:
@jaloopa I have no idea how they managed to take an operation that happens instantly on my laptop and make it take magnitudes longer
The same reason it takes Windows forever to build a file list during a simple copy operation. But worse because JavaScript.
-
@bb36e said in Where’s all my CPU and memory gone? The answer: Slack:
I have no idea how they managed to take an operation that happens instantly on my laptop and make it take magnitudes longer
It was probably building a description of each move before asking them all to be done in one go. With each step in building that operation manifest requiring at least two HTTP requests, one to describe the file as it currently is and the other to check that there isn't a file with that name at the destination.
I've built bulk data movement systems in the past. The parts that are expensive are often not the ones you expect. :(
-
@dkf said in Where’s all my CPU and memory gone? The answer: Slack:
the other to check that there isn't a file with that name at the destination.
Probably not: Google Drive allows files with the same name in the same folder. The primary key is not the filename but some other ID (possibly the one in the URL)
-
@dkf said in Where’s all my CPU and memory gone? The answer: Slack:
The parts that are expensive are often not the ones you expect.
That's also why targeted measuring of where your costs are coming from and whether your performance improvements actually improve performance is quite important.
-
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@anonymous234 Hey, a networked software of mine uses compressed XML in its payloads!
(but because I like protocols that make sense, it's only in the payload: What carries them is binary with a fixed-size header that contains the length of the payload, so the length field has a fixed size because seriously, who uses a variable-length length field?)You'll be pleased to know WebSockets have a length field that is that is either 7 bits, 7 + 16 bits or 7 + 64 bits long
On the other hand, gzip has a fixed 32 bit length field, and any length > 2^32 is recorded mod 2^32, which makes it practically useless
-
@cark said in Where’s all my CPU and memory gone? The answer: Slack:
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@anonymous234 Hey, a networked software of mine uses compressed XML in its payloads!
(but because I like protocols that make sense, it's only in the payload: What carries them is binary with a fixed-size header that contains the length of the payload, so the length field has a fixed size because seriously, who uses a variable-length length field?)You'll be pleased to know WebSockets have a length field that is that is either 7 bits, 7 + 16 bits or 7 + 64 bits long
On the other hand, gzip has a fixed 32 bit length field, and any length > 2^32 is recorded mod 2^32, which makes it practically useless
No, tar's 12-byte field (to contain a null-terminated octal digit string, so 33 bits) is far superior.
-
@pleegwat said in Where’s all my CPU and memory gone? The answer: Slack:
@cark said in Where’s all my CPU and memory gone? The answer: Slack:
@medinoc said in Where’s all my CPU and memory gone? The answer: Slack:
@anonymous234 Hey, a networked software of mine uses compressed XML in its payloads!
(but because I like protocols that make sense, it's only in the payload: What carries them is binary with a fixed-size header that contains the length of the payload, so the length field has a fixed size because seriously, who uses a variable-length length field?)You'll be pleased to know WebSockets have a length field that is that is either 7 bits, 7 + 16 bits or 7 + 64 bits long
On the other hand, gzip has a fixed 32 bit length field, and any length > 2^32 is recorded mod 2^32, which makes it practically useless
No, tar's 12-byte field (to contain a null-terminated octal digit string, so 33 bits) is far superior.
Why do even stick with tar in this day and age? Everything I tar from/to is a block device, which makes it possible to write a header/footer with file offsets, compressed/uncompressed length, checksums and all other useful info, which is pretty useful for things like file listings and single file extraction. We should have replaced tar for 90% of it's current use cases by now
-
@cark you mean like zip files?