Skip to content

Commit

Permalink
move retrieval time mark to the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
kacper-mikolajczak committed Sep 2, 2024
1 parent 3574d9d commit a5bc6aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/memoize/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ function memoize<Fn extends IsomorphicFn, MaxArgs extends number = NonPartial<Is
const stats = new MemoizeStats(options.monitor || Memoize.isMonitoringEnabled);

const memoized = function memoized(...args: IsomorphicParameters<Fn>): IsomorphicReturnType<Fn> {
const statsEntry = stats.createEntry();
const retrievalTimeStart = performance.now();

const statsEntry = stats.createEntry();

// Detect if memoized function was called with `new` keyword. If so we need to call the original function as constructor.
const constructable = !!new.target;

Expand Down

0 comments on commit a5bc6aa

Please sign in to comment.