Vaadin Application Gets Slow

I have developed few applications using Vaadin. But i’m facing this strange issue for the first time. When I run my application locally and access by localhost:8080/DemoApp it works fine and faster, but when I access it from other machine using my IP like 192.168.XX.XX:8080/DemoApp its very slow, like 20 times slow. I tried hosting this application on VPS but same results. Im using Vaadin8. Any help will be great.

its very slow, like 20 times slow

It would be important to know what aspect of the application becomes slow.

However my first guess is that this is somewhat attributed to your network environment. When you run the application via localhost, there is almost zero network latency. If the network is slow, any web application regardless of framework used will show some symptoms of slowness, as loading content from server takes longer time. If the application has lot of user interaction and hence lot of server round trips, then the lag can become noticeable.