Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Make it super fast #31

Merged
merged 1 commit into from
Jan 28, 2019
Merged

Make it super fast #31

merged 1 commit into from
Jan 28, 2019

Conversation

styfle
Copy link
Member

@styfle styfle commented Jan 26, 2019

Fixes #34
Keep a browser around in global scope

@vercel
Copy link

vercel bot commented Jan 26, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link
Member Author

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Looks much faster!

Before and After

image and now its image

@styfle styfle merged commit 4550a02 into master Jan 28, 2019
@styfle styfle deleted the friyay branch January 28, 2019 14:19
@MarvinMiles
Copy link

@styfle Hey!
How does this work? I thought serverless = stateless. Can I keep other data via "global scope"?

Thanks!

@styfle
Copy link
Member Author

styfle commented Jun 15, 2020

Hi Marvin,

Take a look at line 3 to see the global variable.

Think of it like a local cache, it’s not guaranteed to be populated because the function might scale up and create a new instance or it might scale down to 0 when there is no traffic.

noahflk pushed a commit to noahflk/og-image that referenced this pull request Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render faster
2 participants