Text laggy when simulating typing in Python repls

You have to request access by signing into your Google account

did it for me to. Daggum.

Read my comment above

Hey there!

I’ve requested access to the video.

Thanks!

Also, please dont crowd my inbox with notificatios

No lag for me… probably network lag? Either your WiFi or the remote machine’s connection.

1 Like

Its not my Wi-Fi. It might be something else.

1 Like

I was able to reproduce the issue and have sent this to the team. I’m not part of the platform or workspace team, but I believe this might be something to do with overloading our console plugin which slows everything down.

I noticed that as the example program went on, the text got slower and slower. This would mean that the messages to print to the console is most likely overloading our channel and getting throttled in order to stop us from blowing up.

3 Likes

Thanks, Shane! Hope this issue will be fixed now!

1 Like

After a few days, the text is a little laggy than before, but gets a bit worse over time.

When will this be fixed?

1 Like

Most of the team is out because of the holidays. I’m not sure how long with will take to fix, but I’ve set a reminder for when they come back to check up on the internal ticket!

2 Likes

Just wait out the holiday season until the Replit staff get back to babysitting us. If your Repl hasnt unlagged by then, just try to condense your code a bit.

1 Like

I also remember a text game I made that lagged and couldn’t be played on Replit. But it would work fine on my computer.

The repl is here

1 Like

After so many months, the text is still laggy!

Clear all your cookies and clear the cache on your browser. If this doesn’t work, it’s your device itself.

No, this is a reproducible error with Replit to do with ‘spam’ input. (Also refer to Shane’s reply above).

3 Likes

hey sorry for being a lil late to the conversation, but a big reason is that it’s just how it works. What programming languages do is that they store your current output to a buffer string which will print out once it reaches a certain length because printing something is a very costly operation and doing it so often by forcing it to flush (print out the buffer at only one character) is just supremely inefficient and having only a 0.04 second latency makes it lag. After this, when the user inputs something, it gives the console a bit of a break from the constant processing, that is likely where the lag is from.
Possible other causes I can think of:

  1. printing unicode could be costly/laggy
  2. inputting has some sort of buffer optimization to handle the user constantly inputting keybinds and printing out single chars without a buffer, and therefore once you run input the optimization helps your repl to run better.

:smiley:

1 Like

See @ShaneAtReplit 's reply below:

I was able to reproduce the issue and have sent this to the team. I’m not part of the platform or workspace team, but I believe this might be something to do with overloading our console plugin which slows everything down.
I noticed that as the example program went on, the text got slower and slower. This would mean that the messages to print to the console is most likely overloading our channel and getting throttled in order to stop us from blowing up.

1 Like

oh um, the reason is probably this:
replit runs by essentially taking your code, and running it on a server, it will then return your output which will be displayed. Replit has very, very heavy traffic, and while some of the lag may come from server latency, this sounds correct as I have tested on different much more lightly used server sets with what I believe to be the same specs and setups that can run text without glitching, thank you for bringing this to my attention, however!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.