Description:
We have encountered a significant performance issue with NativeMessaging API in Firefox when an extension communicates with a native application.
In scenari… (pročitajte više)
Description:
We have encountered a significant performance issue with NativeMessaging API in Firefox when an extension communicates with a native application.
In scenarios where many objects must be enumerated (e.g., ~458 certificates), Firefox is dozens of times slower than Chromium-based browsers.
Environment:
Firefox (latest stable, reproduced in 2025)
Windows 11 x64
Same machine and same native plugin tested in Chrome, Edge, Yandex Browser
Steps to Reproduce:
Create a WebExtension that communicates with a native application via NativeMessaging.
Perform enumeration of a large number of objects (≈ 450–500).
Measure execution time in Firefox vs Chromium.
Actual results:
Firefox: enumeration of 458 objects takes ~2 min 30 sec
Chromium/Edge/Yandex Browser: enumeration of the same 458 objects takes ~5 sec
Additional tests:
Round-trip time (RTT) for a single message:
Firefox: ~73.7 ms
Chromium: ~0.3 ms
Because the extension and the plugin exchange a large number of messages, this performance gap becomes critical.
Expected results:
NativeMessaging API in Firefox should perform at a level comparable to Chromium browsers, so that extensions relying on heavy message exchange remain usable.
References:
Bug 1288912 – Native messaging performance is extremely poor
Although this bug is marked as resolved, performance testing still shows a major discrepancy in the current versions of Firefox.
Question:
Is there any ongoing work or plan to optimize the implementation of NativeMessaging API in Firefox to address this performance issue?