mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
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:
+4
-3
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user