perf: reduce browsing rerenders and startup cost (#1189)

* chore(profiling): collect serializable react-scan reports

* perf(routing): rerender only when directory winner changes

* perf(zustand): remove shallow warning hot path

* perf(state): narrow directory lifecycle updates

* perf(home): avoid redundant stats render work

* perf(posts): isolate live loading subscriptions

* perf(chrome): skip unchanged shell rerenders

* fix(profiling): drop unsupported render metric

* perf(feeds): skip unchanged loading state renders

* perf(home): stop resolved stats collector renders

* chore(agent run): record rerender verification

* perf(home): defer stats requests until metadata resolves

* perf(startup): load protocol modules on demand

* chore(agent run): record acquisition and startup profiles
This commit is contained in:
Tommaso Casaburi
2026-07-30 00:29:12 +07:00
committed by GitHub
parent 27cc4767c6
commit da03239bb2
33 changed files with 1274 additions and 380 deletions
+4 -3
View File
@@ -490,6 +490,10 @@ export default defineConfig({
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
// bitsocial-react-hooks imports zustand/shallow's deprecated default export and
// passes it as a store equality fn, so its console.warn fires on every comparator
// call (~1000/s while feeds stream). Redirect to an unwrapped re-export.
'zustand/shallow': resolve(__dirname, 'src/lib/zustand-shallow-shim.ts'),
'node-fetch': 'isomorphic-fetch',
assert: 'assert',
stream: 'stream-browserify',
@@ -524,9 +528,6 @@ export default defineConfig({
rollupOptions: {
output: {
manualChunks(id) {
if (/[\\/]node_modules[\\/](@pkcprotocol[\\/]pkc-js)[\\/]/.test(id)) {
return 'pkc-js';
}
if (/[\\/]node_modules[\\/](@bitsocialnet[\\/]bitsocial-react-hooks)[\\/]/.test(id)) {
return 'bitsocial-react-hooks';
}