I am doing Electron development. I got a performance problems.

In my project, I used libuv to do async request and callbacks.
The event loop is uv_default_loop(). Two kinds of handles are created, one 
for common callbacks and the other is for http request.

What I observe is that the http request is invoked after a large latency - 
(around 100ms) while the common callbacks are invoked almost 
immediately.(1ms).

Could anyone tell me what is the possible cause? How can I check where is 
the bottleneck?
Is there any solution to shorten the latency?

Thanks!


Here is the log:
[open-electron:dev] mobilecv2: 1.0.7.0616
[open-electron:dev] Send Http Request at 1614838881:800
[open-electron:dev] Do http request - ListSize: 1 at 1614838881.816 [first 
http request is invoked shortly]
[open-electron:dev] Send Http Request at 1614838882:206 [2nd http request]
[open-electron:dev] Send Http Request at 1614838882:206
[open-electron:dev] Send Http Request at 1614838882:252
[open-electron:dev] Send Http Request at 1614838882:258
[open-electron:dev] Queue and Fire Async Callback at 1614838882:296
[open-electron:dev] Do http request - ListSize: 4 at 1614838882.310 [start 
to invoke 2nd http request, which is 104ms later]
[open-electron:dev] Do callback event - ListSize: 1 at 1614838882.318
[open-electron:dev] Queue and Fire Async Callback at 1614838882:328
[open-electron:dev] Do callback event - ListSize: 1 at 1614838882.329 
[common callbacks are invoked less than 1ms later]

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to libuv+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/bc7f06a2-23d9-44af-87ad-cf88fb291753n%40googlegroups.com.

Reply via email to