Valandur / Web-API

RESTful web server for Minecraft Sponge including an admin panel
https://valandur.github.io/Web-API/
MIT License
66 stars 17 forks source link

speed up the restful response #121

Closed jstony closed 5 years ago

jstony commented 5 years ago

I'm using web-api to teach python programing for k-12. But i found the api server too slow to respon the request. With my desktop pc(i5, 16g ram), it spand 1 sec to resp the /player or /world api. When i process 100 loops to change blocks in the world, it's need 2mins to finish. How can i speed up this? Pls ignore my pool english;)

oblx commented 5 years ago

I have 3 differents setup : distant server running debian and local server running windows.

Response time is always under 50ms on distant server, there is often a lag before executing a request on windows.

My 2 cents, I hope it will help !

jstony commented 5 years ago

Thanks for your reply and i test on centos 7, it's less 50ms to response.

oblx commented 5 years ago

Maybe ticket can stay opened (or reopened) to improve performances on windows. Let the master chose 😄

Valandur commented 5 years ago

Thanks for reporting this. I'm not 100% sure whats going on here to be honest. I locally test on windows too, but I've never done any actual stress or timing tests.

When you say 100 loops to change blocks are you referring to the block operations endpoint?

I would like to keep this open and see what I can figure out

jstony commented 5 years ago

mc

I'm write a demo program in python and change the position of player 10 times. In windows 10, it's 10s and only 0.5s in centos 7.

sfxworks commented 5 years ago

Node versions the same? Processors/server spec the same? Overhead the same? So many factors to just blame WebAPI here

oblx commented 5 years ago

I agree with that, this ticket is a long time issue to resolve.

When I have my new webapi setup, I will put more info, jstony https://github.com/jstony is surely going to help when he can. Let's make webapi a better educational tool :D

Le lun. 7 janv. 2019 à 13:16, Samuel Walker notifications@github.com a écrit :

Node versions the same? Processors/server spec the same? Overhead the same? So many factors to just blame WebAPI here

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Valandur/Web-API/issues/121#issuecomment-451916681, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwOBk4mRe_LlOatVJSeuZlITrS1ShFpks5vAzqQgaJpZM4ZnhXh .

jstony commented 5 years ago

mc2

This ticket can be close now. I'm switch the http request lib from myself to webapi-client-python and test the 100 loops with windows 10 and centos7. It seems all ok.

oblx commented 5 years ago

Thanks for the tip !

Suggestion : allow users to easily configure their custom proxy solution.

I used to replace internal webserver of dynmap as well. Pepperidge farm guy remembers.