Why does it take typed letters time to appear on screen; sometimes several seconds?

Why does it take so much time, sometimes, for letters to appear after I type them? It’s not just on this site, but on other message boards.

I’m thinking your experiencing lag

Lag is a slang term for a noticeable decrease in application speed, due to extreme network congestion or insufficient processing power. When traffic is heavier than network capacity, the network requires that a program wait before sending or receiving data.

Fire up task manager or similar Windows monitoring and see how busy your CPU is - often this is a side effect of the computer being busy on some background task, so it doesn’t get around to the keyboard task as fast or often as it should.

the fix is to figure out what that problem busy task is…

CTL-ALT-DEL - one option is to run task manager.

The main cases I’ve noticed recently were due to a dodgy connection of a wireless keyboard. I’ve since learned that the receivers are directional. My computer is on the floor below my table, and I found I could only get food reception with a USB extender or hub with the receiver pointing up.

It could also be a rather old computer or stuff going on in the background. The latter could also include malware or even just poorly optimized ads.

There should be no lag when typing.

Waaaay back in the mists of time I had a daisy-wheel typewriter and it was possible to type faster than it could put the letters on the paper. If you were fast enough you could get ahead of the typewriter and it would drop characters.

My dad was an attorney and his legal secretaries could type so fast this was a problem so he had to buy IBM Selectric typewriters for them which were stupidly expensive (although they were stellar typewriters…and built like a freaking tank).

A modern computer should easily be fast enough to accept typing of any speed unless it is a touch-screen you are typing on or a wireless connection. Touch screens can vary a lot in how responsive they are. Wireless can be plenty fast but if you have a bad wireless connection and/or a low battery that can affect things.

Typing on a website should always be fast. Internet connection should not matter. Here on the SDMB you type into a window and the internet only comes into it when you submit your post. Then everything you wrote gets submitted in one go (and that is fast because text takes up very little data).

The other possibility, as mentioned above, is to check if some background tasks are gobbling up CPU cycles.

It can also be an issue of stuff from the website going on in the background. I note that there is a bit of a delay whenever you first click the Report Feedback option on YouTube. This seems to be because it is grabbing information in the background, primarily a screenshot. JavaScript is still single threaded, and you do actually still have to worry about making sure there’s no bottleneck between the typing and rendering.

That said, the SDMB (like other boards running on Discourse) seems to be well coded to avoid this problem.

Discourse may be well and competently coded, but there’s still room for slowness. Note that in Discourse, you have a text box where you type your post, and an adjacent box where your post appears fully formatted as you type it character by character. Note also that a single character or just a few in your input text can make a major change in the formatted appearance of the formatted text.

So the Javascript that is doing all that (running locally in your computer) has to re-scan and re-format the entirety of the text your entered so far, with every character you type. That’s gotta chew up CPU cycles.

Contrast with vBulletin, which only showed you the formatted result when you clicked on the Preview button, and did not format your text in real-time character by character.

Sure, but there’s no reason it needs to do it synchronously. My observation is that it is in fact asynchronous, meaning it runs whenever it can find the time, and doesn’t seem to block keyboard input.

Plus you can always click the << button in the bottom corner to disable the preview.

It can be your browser rather than your connection. The lags I see are often from an anti-virus tool running, defrag, my backup software indexing things, or when a high memory usage tool starts to thrash. Looking at task manager is good, and you can dive deeper to see which applications are using memory and disk.

I have an even more annoying on Android Firefox. Sometimes I type faster than the buffer can handle and it starts pasting a group of buffered letters into everything, usually at the end of each word but sometimes mid-word. I will be typing, look up, and see that I have somethingave likeave thisave.

I just love this typo. I wish I could get food reception with my keyboard.

On PLATO there was term-talk (term being a button on the PLATO keyboard) for basically IMs in 1975. They invented term-pizza which supposedly caused a pizza to materialize at your terminal.
Never worked when I tried it.

Gotta be your gear - these letters appeared almost before the keystroke.

Dan

Okay, real example for entertainment purposes. Just now I was looking for posts that mention Popcorn Factory. So I type in Popcorn factory. Only when I look up, the search box has been filled in with “Popcorn opcornfopcornaopcorncopcorntopcornoropcorny”.

I haven’t looked into how Discourse works with respect to this, but it looks to me like every character gets sent to the server and also gets rendered on both the edit window and the preview window.

The advantage of doing it this way is that if something goes wrong (browser/computer crash, accidentally close the window, etc.) and you go back to the page, your editing is still there.

The disadvantage is that you get annoying lag if there are any internet delays.

If I get some time later I may fire up wireshark and see what actually goes back and forth while you are typing. I don’t have time to do that right now though.