issues
search
TryGhost
/
Ghost
Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.27k
stars
10.11k
forks
source link
Optimized aggregating member attribution statistics
#20511
Closed
daniellockyer
closed
1 week ago
daniellockyer
commented
1 week ago
the existing code creates a new moment instance, takes away some days and then formats the result
this is run for every entry of the member attribution stats, which means dashboards for big sites with a lot of attribution data become slow
this value doesn't change across each iteration of the filter, so we can just extract it out and calculate it once
this commit removes this code block from the flamegraph completely