vpnProvider API bottleneck

已查看 57 次
跳至第一个未读帖子

William Xiang

未读,
2022年5月16日 15:14:182022/5/16
收件人 Chromium Extensions
Hi all,
I'm currently developing a VPN extension for Chromebook and I'm observing some slow vpn performances.
I'm using the Pixelbook. Without vpn, speed test results are around 100Mbps down. But with vpn, it fluctuates between 15-25 Mbps.
The extension code basically passes the network packets through a websocket to the server and back. There are no packet data modification on js side, just simply passing packets from onPacketReceived API to WS send and WS received to sendPacket API. Both functions are one liners.
I ran a performance test with chrome devtool during vpn session and it shows "system" taking up way more time than scripting calls. I assume this is because the vpnProvider API is working to pass packets to the OS network stack. I sometimes get dbus limit exceeded errors from lastError on sendPacket as well.
Am I reaching the limit of JavaScript based vpnProvider or am I missing something?

Maksim Ivanov

未读,
2022年5月17日 16:12:582022/5/17
收件人 William Xiang、Chromium Extensions
Hello,

The vpnProvider API indeed introduces a bunch of overhead. It's a known issue, related to the fact that the network packets, piped through the extension API, travel through a bunch of IPCs and format conversions. There've been some attempts to improve the API's implementation in Chrome in the past (e.g., crbug.com/506490 - an attempt to wire it up directly with native code via PPAPI). As can be seen, that effort in crbug.com/506490 was WontFix'ed, similarly to other attempts, and I don't think investments into this API's performance are planned at this point.


Regards,
Maksim


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/7584c097-a56b-490f-a4c7-617683d689fdn%40chromium.org.


回复全部
回复作者
转发
0 个新帖子