# Memoization and option modules

**URL:** https://discourse.nixos.org/t/memoization-and-option-modules/55772
**Category:** Help
**Created:** [November 9, 2024, 10:11am UTC](https://discourse.nixos.org/t/memoization-and-option-modules/55772 "2024-11-09T10:11:56Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [November 9, 2024, 5:01pm UTC](https://discourse.nixos.org/t/memoization-and-option-modules/55772/2 "2024-11-09T17:01:33Z")

</div>

I think the performance impact of a function call is minimal in most cases, compared to the time saved having to not refactor things across a tree if you need to make a change to the behaviour. We can’t answer universally in the abstract.

Ultimately profiling is the answer. I only found [Nix flamegraph or profiling tool?](https://discourse.nixos.org/t/nix-flamegraph-or-profiling-tool/33333) about this topic, though. But I will say, “performant” is relative, and if nixpkgs is involved, it will be slow. At best you can identify if there are major errors and correct those.

---

_[View the full topic](https://discourse.nixos.org/t/memoization-and-option-modules/55772)._
