Skip to content

perf: use LRU cache for getServerSession#8339

Merged
kodiakhq[bot] merged 6 commits into
mainfrom
session-ttl
Apr 18, 2023
Merged

perf: use LRU cache for getServerSession#8339
kodiakhq[bot] merged 6 commits into
mainfrom
session-ttl

Conversation

@G3root
Copy link
Copy Markdown
Contributor

@G3root G3root commented Apr 18, 2023

What does this PR do?

currently the Map object is used as a in memory-store for storing session tokens which might cause memory leaks while used on a long running servers. this PR aims to fix that

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@G3root G3root requested a review from zomars as a code owner April 18, 2023 00:15
@G3root G3root requested a review from a team April 18, 2023 00:15
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 1:42am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 1:42am

@socket-security
Copy link
Copy Markdown

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
lru-cache@9.0.3 None +0 isaacs

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 389.07 KB 620.36 KB 177.24% (🟢 -0.17%)
/auth/setup 81.57 KB 312.86 KB 89.39% (🟢 -0.17%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 389.07 KB 620.35 KB 177.24% (🟢 -0.17%)
/auth/setup 81.58 KB 312.86 KB 89.39% (🟢 -0.17%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Apr 18, 2023

Current Playwright Test Results Summary

✅ 53 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 04/18/2023 01:53:20am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 07650b6

Started: 04/18/2023 01:48:05am UTC

⚠️ Flakes

📄   apps/web/playwright/manage-booking-questions.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Manage Booking Questions For Team EventType Do a booking with a user added question and verify a few thing in b/w
Retry 1Initial Attempt
1.33% (3) 3 / 225 runs
failed over last 7 days
6.22% (14) 14 / 225 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch thinking about non-serverless environments.

Ship it

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 389.68 KB 620.97 KB 177.42% (🟡 +0.17%)
/auth/setup 82.16 KB 313.44 KB 89.56% (🟡 +0.16%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@kodiakhq kodiakhq Bot merged commit f467bb7 into main Apr 18, 2023
@kodiakhq kodiakhq Bot deleted the session-ttl branch April 18, 2023 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge ♻️ autoupdate tells kodiak to keep this branch up-to-date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants