Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cc90576
perf(snapshot): optimize code flow of slimDomExcluded
JonasBa Jul 28, 2023
18ca335
perf(snapshot): remove lowerIfExists
JonasBa Jul 28, 2023
ba66b77
perf(snapshot): return early
JonasBa Jul 28, 2023
dc4c7b1
perf(snapshot): test
JonasBa Jul 29, 2023
85b23bf
perf(mutation): shift n^2
JonasBa Jul 29, 2023
bad990b
perf(mutation): improve process
JonasBa Jul 30, 2023
5d59621
fix(mutation): revert regexp exec
JonasBa Aug 1, 2023
58ab15c
fix(prettier): apply formatting
JonasBa Aug 1, 2023
011e0d0
Merge branch 'master' into jb/perf/replay
JonasBa Aug 3, 2023
f6c8738
fix: filter condition
JonasBa Aug 3, 2023
e6bb17e
fix: remove unused import
JonasBa Aug 3, 2023
a927384
fix: lint
JonasBa Aug 3, 2023
23512e6
test: update snapshots
JonasBa Aug 3, 2023
510d82d
revert(genAdds): revert queue implementation
JonasBa Aug 7, 2023
fab0d3d
revert(genAdds): revert snapshot
JonasBa Aug 7, 2023
e188253
feat(benchmark): add blockClass and blockSelector benchmarks
JonasBa Aug 10, 2023
12dc788
Merge branch 'master' into jb/perf/replay
JonasBa Aug 10, 2023
8750f7f
Revert "feat(benchmark): add blockClass and blockSelector benchmarks"
JonasBa Aug 10, 2023
5b05e6b
ref(perf): less recursion and a few minor optimizations
JonasBa Aug 10, 2023
074fdd9
Revert "ref(perf): less recursion and a few minor optimizations"
JonasBa Aug 10, 2023
eab4b25
ref(perf): less recursion
JonasBa Aug 10, 2023
eed46b0
fix(lint): format doc
JonasBa Aug 10, 2023
bc2c8f2
Merge branch 'master' into jb/perf/replay
JonasBa Aug 17, 2023
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
Prev Previous commit
Next Next commit
Revert "feat(benchmark): add blockClass and blockSelector benchmarks"
This reverts commit e188253.
  • Loading branch information
JonasBa committed Aug 10, 2023
commit 8750f7f205ce5f4a7ed2c56f828d3b78bdb37bdf
58 changes: 19 additions & 39 deletions packages/rrweb/test/benchmark/dom-mutation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const suites: Array<
title: string;
eval: string;
times?: number; // defaults to 5
options?: recordOptions<eventWithTime>
} & ({ html: string } | { url: string })
> = [
// {
Expand All @@ -19,48 +18,30 @@ const suites: Array<
// eval: 'document.querySelector("button").click()',
// times: 10,
// },
// {
// title: 'create 1000x10 DOM nodes',
// html: 'benchmark-dom-mutation.html',
// eval: 'window.workload()',
// times: 10,
// },
// {
// title: 'create 1000x10x2 DOM nodes and remove a bunch of them',
// html: 'benchmark-dom-mutation-add-and-remove.html',
// eval: 'window.workload()',
// times: 10,
// },
// {
// title: 'create 1000 DOM nodes and append into its previous looped node',
// html: 'benchmark-dom-mutation-multiple-descendant-add.html',
// eval: 'window.workload()',
// times: 5,
// },
// {
// title: 'create 10000 DOM nodes and move it to new container',
// html: 'benchmark-dom-mutation-add-and-move.html',
// eval: 'window.workload()',
// times: 5,
// },
{
title: 'Create 1000x10 DOM nodes that are blocked using blockClass',
html: 'benchmark-dom-mutation-add-blocked.html',
title: 'create 1000x10 DOM nodes',
html: 'benchmark-dom-mutation.html',
eval: 'window.workload()',
times: 10,
},
{
title: 'create 1000x10x2 DOM nodes and remove a bunch of them',
html: 'benchmark-dom-mutation-add-and-remove.html',
eval: 'window.workload()',
times: 10,
},
{
title: 'create 1000 DOM nodes and append into its previous looped node',
html: 'benchmark-dom-mutation-multiple-descendant-add.html',
eval: 'window.workload()',
times: 5,
options: {
blockClass: "blocked"
}
},
{
title: 'Create 1000x10 DOM nodes that are blocked using blockSelector',
html: 'benchmark-dom-mutation-add-blocked.html',
title: 'create 10000 DOM nodes and move it to new container',
html: 'benchmark-dom-mutation-add-and-move.html',
eval: 'window.workload()',
times: 5,
options: {
blockSelector: ".blocked"
}
}
},
];

function avg(v: number[]): number {
Expand Down Expand Up @@ -125,7 +106,7 @@ describe('benchmark: mutation observer', () => {
};

const getDuration = async (): Promise<number> => {
return (await page.evaluate((triggerWorkloadScript, replayOptions) => {
return (await page.evaluate((triggerWorkloadScript) => {
return new Promise((resolve, reject) => {
let start = 0;
let lastEvent: eventWithTime | null;
Expand All @@ -142,7 +123,6 @@ describe('benchmark: mutation observer', () => {
}
resolve(lastEvent.timestamp - start);
},
...replayOptions
};
const record = (window as any).rrweb.record;
record(options);
Expand All @@ -154,7 +134,7 @@ describe('benchmark: mutation observer', () => {
record.addCustomEvent('FTAG', {});
});
});
}, suite.eval, suite.options ?? {})) as number;
}, suite.eval)) as number;
};

// generate profile.json file
Expand Down
32 changes: 0 additions & 32 deletions packages/rrweb/test/html/benchmark-dom-mutation-add-blocked.html

This file was deleted.