Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

Low performance of NativeMessaging API in Firefox compared to Chromium (dozens of times slower)

more options

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?

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?
Priložené obrázky

Všetky odpovede (2)

more options

Could you report it on https://bugzilla.mozilla.org ? That old bug is closed.

It would be nice to attach a perf profile to your bug.

Thanks.

Pomohla vám táto odpoveď?

more options

TyDraniu said

Could you report it on https://bugzilla.mozilla.org ? That old bug is closed. It would be nice to attach a perf profile to your bug. Thanks.

Thank you for your quick response.

I noticed an interesting effect while testing with the profiler:

When I start "Record a performance profile", the enumeration of certificates (≈458 objects) completes much faster — about 1 minute.

When I do not enable profiling, the same operation takes about 5 minutes, as originally reported.

So, enabling performance profiling significantly reduces the delay, which looks unusual. It seems that recording a profile changes the timing/behavior of the NativeMessaging communication in Firefox.

Pomohla vám táto odpoveď?

Položiť otázku

Ak chcete odpovedať na príspevky, musíte sa prihlásiť do svojho účtu. Ak ešte nemáte účet, položte novú otázku.