Bug 1682025 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> Did we ever end up making a performance analysis for Fluent UI with a lot of selectors? 

I don't think we did, but I just run a little back-of-a-napkin benchmark on a local laptop:

For scale, I started by just formatting 100 compound messages in browser console: ~900us.
I expect bulk of it to be Rust->JS, XPCOM, struct allocation etc.

Next, I tested https://github.com/projectfluent/fluent-rs for simple.ftl (100 simple messages) vs simple2.ftl (100 messages with a selector): 4us -> 12us.

So, while in the first part I formatted compound messages (each message had ~2 attributes), and some of them had variables etc., my initial guess is that the difference between selector and lack of selector should account for no more than 10/900 = 1% of the total time of formatting.

If you'll need more detailed evaluation, I can take the simple.ftl/simple2.ftl into the browser and test again.
> Did we ever end up making a performance analysis for Fluent UI with a lot of selectors? 

I don't think we did, but I just run a little back-of-the-envelope benchmark on a local laptop:

For scale, I started by just formatting 100 compound messages in browser console: ~900us.
I expect bulk of it to be Rust->JS, XPCOM, struct allocation etc.

Next, I tested https://github.com/projectfluent/fluent-rs for simple.ftl (100 simple messages) vs simple2.ftl (100 messages with a selector): 4us -> 12us.

So, while in the first part I formatted compound messages (each message had ~2 attributes), and some of them had variables etc., my initial guess is that the difference between selector and lack of selector should account for no more than 10/900 = 1% of the total time of formatting.

If you'll need more detailed evaluation, I can take the simple.ftl/simple2.ftl into the browser and test again.

Back to Bug 1682025 Comment 11