Hey Defolder,
I’m experiencing some weirdness where http.request on any url called at init will require at least 6 or 7 seconds before calling the callback.
I am not on a slow network.
I get messages in Defold console like this:
I’ve tried to my own local server, to google, etc but there seems to be some weird lag. I’ve also tried stripping down the active calls but the delay persists.
Any suggestions? Am I running an outdated version of http or something?
Thanks,
grify
P.S. I’ve tried fetching extremely simple and short text strings from my boiletplate http server and while the data loads almost immediately (less than 1 second) in browser, it always takes an extra ~6 seconds on defold.
I’ve confirmed that the problem isn’t on the WiFi, as on my hotspot I get this:
INFO:DLIB: SSDP: Started on address 172.20.10.7
DEBUG:SCRIPT: request sent at 0.319642
WARNING:DLIB: Profiler Message.Dispatch @__http_worker_0 took 2.808 seconds
DEBUG:SCRIPT: received at 0.596155
DEBUG:SCRIPT: 200
WARNING:DLIB: Profiler TimerWorld.Update took 2.544 seconds
and those times are os.clock(). http.request is called only once, in init.
To be clear, this always loads within a second on browser.
Thank you. Very strange because with restarting neither Defold nor my computer, and not even using my computer whatsoever from last morning to this one, the lag seems gone. Same WiFi, same project, same code, same instance of Defold, same environment, and same cat by my side, it just works now. I’m running alternate tests enabling and disabling components but it seems like even with everything enabled, the request-response time has inexplicable dropped from 6 seconds to 0.2 seconds. I’ll finish my tests and keep working as normal but keep this post open a bit longer in case it recurs.
Thanks for your help Pkeod and Britzl, I really appreciate it.
Have a nice day!
grify