René's URL Explorer Experiment


Title: Performance degradation · Issue #549 · phpdotenv/phpdotenv · GitHub

Open Graph Title: Performance degradation · Issue #549 · phpdotenv/phpdotenv

X Title: Performance degradation · Issue #549 · phpdotenv/phpdotenv

Description: Some time ago we were performing updates to all our packages, including the dotenv, where we went from v2 to v5. And later we noticed that the CPU usage and all request times have increased substantially, even though we use pretty beefy ...

Open Graph Description: Some time ago we were performing updates to all our packages, including the dotenv, where we went from v2 to v5. And later we noticed that the CPU usage and all request times have increased substan...

X Description: Some time ago we were performing updates to all our packages, including the dotenv, where we went from v2 to v5. And later we noticed that the CPU usage and all request times have increased substan...

Opengraph URL: https://github.com/phpdotenv/phpdotenv/issues/549

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance degradation","articleBody":"Some time ago we were performing updates to all our packages, including the dotenv, where we went from v2 to v5. And later we noticed that the CPU usage and all request times have increased substantially, even though we use pretty beefy instances. On 8 core instances, CPU usage increased by >20%.   \r\n\r\nAfter some investigation, we found out that the dotenv load times have skyrocketed and memory consumption has gone up quite a lot too. The primary cause of regression was pinned down to this method https://github.com/vlucas/phpdotenv/blob/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7/src/Parser/EntryParser.php#L46-L60\r\nWhere now, to parse one .env line, it needs to create a bunch of classes and then the final entry is at least 2 classes that are kept in memory. Compared to a simple `array\u003cstring, string>` in v2.  \r\n\r\nOur .env is 2k lines long of which around 400 are empty lines and another 300 are comments.  \r\nSo we downgraded back to v2 and the difference is huge, especially during peak hours.\r\n\r\nFor example, in one simple and fast route, during peak hours, the difference between v2 and v5 is around 80ms per request. On a route that has around 65k req/h (1m+ req/day) that makes more than 80 minutes of extra processing time in an hour, just on this route. \r\nHere's an example of that route after the downgrade performed on the 8th of Feb. No other changes to the code or infrastructure were done.\r\n![image](https://user-images.githubusercontent.com/25028046/218736340-394b5ab6-475e-4b13-bae8-9253e20edce1.png)\r\n\r\nI know, the obvious solution would be some sort of caching. But is there really a need for so much more processing and objectifying? ","author":{"url":"https://github.com/makstech","@type":"Person","name":"makstech"},"datePublished":"2023-02-14T15:37:14Z","url":"https://github.com/phpdotenv/phpdotenv/issues/549"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0c0f6a25-5622-ce4d-da7e-c74c2470d56d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD670:3C2607:53089C:6BA6BB:6B061EE6
html-safe-nonce0860282718d539558715dac0b97e9d6a6a24ac4e30b2ad97e8e2ffad041fe2aa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjcwOjNDMjYwNzo1MzA4OUM6NkJBNkJCOjZCMDYxRUU2IiwidmlzaXRvcl9pZCI6IjM5MDQ2ODYwNTA1NTk1MzI3NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccdfe1d641ede2124e6876b0c31e2336dda33a4285f5cd429c21d26244f69e932
hovercard-subject-tagissue:1584382562
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpdotenv/phpdotenv/549/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2a01a5d576b27ca01c7687d93c0cdf141979989b63b0118e81c854085be47858/phpdotenv/phpdotenv/issues/549
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2a01a5d576b27ca01c7687d93c0cdf141979989b63b0118e81c854085be47858/phpdotenv/phpdotenv/issues/549
og:image:altSome time ago we were performing updates to all our packages, including the dotenv, where we went from v2 to v5. And later we noticed that the CPU usage and all request times have increased substan...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemakstech
hostnamegithub.com
expected-hostnamegithub.com
None9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d
turbo-cache-controlno-preview
go-importgithub.com/phpdotenv/phpdotenv git https://github.com/phpdotenv/phpdotenv.git
octolytics-dimension-user_id320763234
octolytics-dimension-user_loginphpdotenv
octolytics-dimension-repository_id7769432
octolytics-dimension-repository_nwophpdotenv/phpdotenv
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7769432
octolytics-dimension-repository_network_root_nwophpdotenv/phpdotenv
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb25c3080e84402f75431d8dc7a96b2635219cec7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/phpdotenv/phpdotenv/issues/549#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpdotenv%2Fphpdotenv%2Fissues%2F549
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpdotenv%2Fphpdotenv%2Fissues%2F549
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=phpdotenv%2Fphpdotenv
Reloadhttps://github.com/phpdotenv/phpdotenv/issues/549
Reloadhttps://github.com/phpdotenv/phpdotenv/issues/549
Reloadhttps://github.com/phpdotenv/phpdotenv/issues/549
phpdotenvhttps://github.com/phpdotenv
phpdotenvhttps://github.com/phpdotenv/phpdotenv
Codehttps://github.com/phpdotenv/phpdotenv
Issues1 (1)https://github.com/phpdotenv/phpdotenv/issues
Pull requestshttps://github.com/phpdotenv/phpdotenv/pulls
Actionshttps://github.com/phpdotenv/phpdotenv/actions
Projectshttps://github.com/phpdotenv/phpdotenv/projects
Security and quality4 (4)https://github.com/phpdotenv/phpdotenv/security
Insightshttps://github.com/phpdotenv/phpdotenv/insights
https://github.com/phpdotenv/phpdotenv
New issuehttps://github.com/login?return_to=https://github.com/phpdotenv/phpdotenv/issues/549
New issuehttps://github.com/login?return_to=https://github.com/phpdotenv/phpdotenv/issues/549
Performance degradationhttps://github.com/phpdotenv/phpdotenv/issues/549#top
https://github.com/makstech
makstechhttps://github.com/makstech
on Feb 14, 2023https://github.com/phpdotenv/phpdotenv/issues/549#issue-1584382562
https://github.com/vlucas/phpdotenv/blob/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7/src/Parser/EntryParser.php#L46-L60https://github.com/vlucas/phpdotenv/blob/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7/src/Parser/EntryParser.php#L46-L60
https://user-images.githubusercontent.com/25028046/218736340-394b5ab6-475e-4b13-bae8-9253e20edce1.png
https://github.com/GrahamCampbell
GrahamCampbellhttps://github.com/GrahamCampbell
on Feb 14, 2023https://github.com/phpdotenv/phpdotenv/issues/549#issuecomment-1430030010
https://github.com/GrahamCampbell
GrahamCampbellhttps://github.com/GrahamCampbell
on Feb 14, 2023https://github.com/phpdotenv/phpdotenv/issues/549#issuecomment-1430031792
https://github.com/makstech
makstechhttps://github.com/makstech
on Feb 15, 2023https://github.com/phpdotenv/phpdotenv/issues/549#issuecomment-1431525446
https://github.com/GrahamCampbell
GrahamCampbellhttps://github.com/GrahamCampbell
on Aug 23, 2026https://github.com/phpdotenv/phpdotenv/issues/549#issuecomment-5388252650
GrahamCampbellhttps://github.com/GrahamCampbell
completedhttps://github.com/phpdotenv/phpdotenv/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 23, 2026https://github.com/phpdotenv/phpdotenv/issues/549#event-29880480482
Sign up for freehttps://github.com/signup?return_to=https://github.com/phpdotenv/phpdotenv/issues/549
Sign in to commenthttps://github.com/login?return_to=https://github.com/phpdotenv/phpdotenv/issues/549
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.