Skip to content

Draft: Reduce useless call of decode#67

Closed
d8corp wants to merge 11 commits intonanostores:mainfrom
d8corp:fix_first-init-bug_2
Closed

Draft: Reduce useless call of decode#67
d8corp wants to merge 11 commits intonanostores:mainfrom
d8corp:fix_first-init-bug_2

Conversation

@d8corp
Copy link
Copy Markdown
Contributor

@d8corp d8corp commented Feb 5, 2026

I'm not convinced this is the best approach, but it might have merit. We could refine it further.

Issues I see:

  • Creating a Promise for each persistent atom feels heavy.
  • It increases bundle size.

Benefits:

  • Reduces unnecessary decode calls, which should improve performance if decode is time-intensive.

@d8corp
Copy link
Copy Markdown
Contributor Author

d8corp commented Feb 5, 2026

I've added PR #1 to compare the differences with PR #66.

@ai
Copy link
Copy Markdown
Member

ai commented Feb 5, 2026

I think we should ignore 1 extra call here. All fixes look more dangerous and complicated.

@d8corp
Copy link
Copy Markdown
Contributor Author

d8corp commented Feb 5, 2026

@ai, I've improved the solution. Now we keep the string storage value and only call decode when it actually changes.

@ai ai closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants