funnyboy-roks/pastes

Convert to synchronous code (remove tokio)

Closed this issue · 0 comments

  • Tokio and other async runtimes bring in a fair amount of code which could increase the binary size. If you're not using asynchronous I/O operations extensively, then removing Tokio and async could potentially reduce the binary size.
  • In terms of code complexity, async programming can make the code more complex due to the need to handle Futures, Tasks, etc. If your app doesn't need to perform many I/O operations concurrently, then a synchronous version might be simpler.
  • However, if your CLI application needs to handle a large number of I/O-bound tasks concurrently (like a web server or a database), using an asynchronous runtime like Tokio can make it more efficient but if you don't have future plans for integrating with web server , I would suggest remove tokio and make code binary simple , smaller !

you can assign this issue to me if you think this issue make sense!