Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/loud-cars-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@builder.io/qwik': minor
---

PERF: Computed signals now only trigger listeners if their value has changed
6 changes: 4 additions & 2 deletions packages/qwik/src/core/use/use-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,10 @@ export const runComputed = (
untrack(() => {
const signal = task.$state$! as SignalInternal<unknown>;
signal[QObjectSignalFlags] &= ~SIGNAL_UNASSIGNED;
signal.untrackedValue = returnValue;
signal[QObjectManagerSymbol].$notifySubs$();
if (signal.untrackedValue !== returnValue) {
signal.untrackedValue = returnValue;
signal[QObjectManagerSymbol].$notifySubs$();
}
});
};
const fail = (reason: unknown) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik/src/server/preload-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const preloaderPre = (
* We add modulepreloads even when the script is at the top because they already fire during
* html download
*/
jsx('link', { rel: 'modulepreload', href: preloaderPath, nonce }),
jsx('link', { rel: 'modulepreload', href: preloaderPath, nonce, crossorigin: 'anonymous' }),
jsx('link', {
rel: 'preload',
href: bundleGraphPath,
Expand Down