Why is Repl so slow for Java?
I run code in Java in Leetcode editor and it takes less than 1 second to execute. But in Repl it takes like 5 seconds. Why is this? I'm trying to learn Java so I have to execute code A LOT because half the time the code has some sort of error or I just want to run a random piece of code to see if it actually works. Does anyone know of a faster platform? I'm using Leetcode right now but Leetcode honestly doesn't seem like a formal IDE to learn Java...
Repl.it is super slow for java, it always has been. I think it's because of the compiler they use, or how they are using it.
Anyways, create a
.replit file, and inside put:
run="javac [File].java ; java [Class]"
Then, after you have compiled:
Also report this to feedback!
A few hours ago repl.it had a sorta outage; the site was down, things were taking super slowly to load, etc.
it should be fixed now, but maybe still not working for you or something like that.
But anyways, what you've described seems like a bug, because Java should normally execute not in 5 seconds (unless your code is super super super long).
try one of the following:
- reloading page/deleting tab
- forking repl
- making new Java repl to see if the problem persists
- make a repl in a different lang to see if other languages have this problem. If yes, its most likely a bug, you can report it here
If you want faster platforms, try these:
@Bookie0 I'm running the code right now with a fresh java repl that just prints "Hello World". It takes about 5 seconds every time I click the run button until I can see "hello world" actually printed out. In python Repl, it takes less than 1 second to see "hello world" printed out. I personally would prefer an online IDE as I don't like to deal with packages/installations of stuff locally.
I tried making a repl in java, and yea you're right it takes more or less 3-5 seconds to execute!
i tried searching online if java is slow, found this.)
and maybe this could be useful (probably not tho)
and i tried searching "java execution slow repl.it", but still didnt find anything unfortunately.
I guess you can suggest that repl.it make execution faster in feedback
So i guess you gonna have to live with it being slow, even if thats annoying. Or you can switch to another online IDE, i heard Vscode is great.
but yea sorry about that :/ @GeorgeZhou1