question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature flags can be costly when read zillions of times

See original GitHub issue

Some feature flags (such as the one for Spaces) are checked in hot code paths, such as isRoomVisible. Every time we check a feature flag, we read it from localStorage. 😱

We should probably cache those feature flags in memory instead.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
t3chguycommented, Jul 15, 2021

But for the Spaces beta specifically we can lean into that and read it once and know it won’t change in this lifetime - I will do so

0reactions
robintowncommented, Jul 15, 2021

Ah, then nevermind

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Flags: The Hidden Switch Behind Continuous ...
Feature flags allows you to ship code more frequently, test on production, and wow your users by revealing the feature at the right...
Read more >
Feature Flags—What Are Those? Uses, Benefits & Best ...
As we've noted, feature flags offer many benefits to development teams. However, they can incur technical debt that is often referred to as...
Read more >
Essential Guide to Feature Flags
Feature Flags Enable Continuous Delivery​​ Feature flags are an integral part of continuous delivery. They allow engineers to decouple deployment from release ...
Read more >
Coding with Feature Flags: How-to Guide and Best Practices
A feature flag splits your code paths into two or sometimes more. This means that now you have that many more paths to...
Read more >
Feature Toggles (aka Feature Flags)
It also greatly reduces the testing burden of feature flags. There is less need to verify how the release will perform with both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found