multithreading - Running java in cmd more memory consuming then IDE -


i beginner java programming, , write program http request in every minute.

and try build jar , run on cmd, because want run few java in same time. see it’s memory consuming higher run on ide. , program have lot of console output.

and lot of people told me use multi thread finish work, research said multi thread when process loading switch other process load, multi thread real multi tasking? because in future maybe http request every 5 second , want real multi tasking function.

thanks everyone, , sorry bad english .

p.s. using intellij community version

memory consumption:

lange amounts of console output can influence memory usage.

the command line , ide handle console output differently (e.g. buffer size).
you should ask yourself: do need console output?

furthermore it's possible ide uses different commandline paramater start jvm (e.g. heap size)


multithreading:

before use multiple threads should ask 1 question: does program benefit multithreading?

in future maybe http request every 5 second

for task runs every 5 seconds, won't need multithreading!


multithreading make debugging (and thereby bugfixing) , maintaining code lot harder. 1 should have quite experience in software developing before starts use it!


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -