René's URL Explorer Experiment


Title: Performance & Code Style, avoid passing iterators around · Issue #340 · stleary/JSON-java · GitHub

Open Graph Title: Performance & Code Style, avoid passing iterators around · Issue #340 · stleary/JSON-java

X Title: Performance & Code Style, avoid passing iterators around · Issue #340 · stleary/JSON-java

Description: Hi, I have an issue with the JSONObjecy#keys() method. It states it is an iterator, though the name implies it is an access to a collection. I have also noticed that is it used often in a while(iter.hasNext){foo = iter.next; ...) pattern...

Open Graph Description: Hi, I have an issue with the JSONObjecy#keys() method. It states it is an iterator, though the name implies it is an access to a collection. I have also noticed that is it used often in a while(ite...

X Description: Hi, I have an issue with the JSONObjecy#keys() method. It states it is an iterator, though the name implies it is an access to a collection. I have also noticed that is it used often in a while(ite...

Opengraph URL: https://github.com/stleary/JSON-java/issues/340

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance & Code Style, avoid passing iterators around","articleBody":"Hi,\r\nI have an issue with the JSONObjecy#keys() method. It states it is an iterator, though the name implies it is an access to a collection. I have also noticed that is it used often in a while(iter.hasNext){foo = iter.next; ...) pattern. This is not as optimal as using an enhanced for loop on a JSONObject#keySet(). It is murky as to whether or not I am allowed to contribute code yet, but if you replace all #keys accesses by #keyset for loops you can go from parsing a 2 GB file in 125 seconds to 115. this is not an order of magnitude like @johnjaylward 's #337  patch, but it's still pretty decent.\r\n\r\nOne could argue the reason for doing the iterator is to avoid issues with concurrent modifications. I would argue that a readwritelock would be a safer approach in general.\r\n\r\nThanks for making such a great product by the way.","author":{"url":"https://github.com/TheMatthew","@type":"Person","name":"TheMatthew"},"datePublished":"2017-05-22T01:16:51Z","url":"https://github.com/stleary/JSON-java/issues/340"}

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:f210a8ff-457e-7025-fd15-45f0135e663a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAF8C:5A20F:98F77:DB17D:6AFD58DE
html-safe-nonceeb9f8d914b7ce86d733c8bf5aa9d4ce821c4ed0d51af1efda054a64697f0798f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjhDOjVBMjBGOjk4Rjc3OkRCMTdEOjZBRkQ1OERFIiwidmlzaXRvcl9pZCI6IjQzNTczMjAxNTEyMzQ1OTkxMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4cb6b08bc2cf8f5dc366f24e2bfce198bd8ee05284214a819a01de4d1da43d78
hovercard-subject-tagissue:230263075
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/stleary/JSON-java/340/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d21ae862b1dd1cad5787dcc4fa4ac433c01892864c81a4eceb3b4365d7bd4e7/stleary/JSON-java/issues/340
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d21ae862b1dd1cad5787dcc4fa4ac433c01892864c81a4eceb3b4365d7bd4e7/stleary/JSON-java/issues/340
og:image:altHi, I have an issue with the JSONObjecy#keys() method. It states it is an iterator, though the name implies it is an access to a collection. I have also noticed that is it used often in a while(ite...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTheMatthew
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
go-importgithub.com/stleary/JSON-java git https://github.com/stleary/JSON-java.git
octolytics-dimension-user_id5107558
octolytics-dimension-user_loginstleary
octolytics-dimension-repository_id1187853
octolytics-dimension-repository_nwostleary/JSON-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1187853
octolytics-dimension-repository_network_root_nwostleary/JSON-java
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
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/stleary/JSON-java/issues/340#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstleary%2FJSON-java%2Fissues%2F340
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%2Fstleary%2FJSON-java%2Fissues%2F340
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=stleary%2FJSON-java
Reloadhttps://github.com/stleary/JSON-java/issues/340
Reloadhttps://github.com/stleary/JSON-java/issues/340
Reloadhttps://github.com/stleary/JSON-java/issues/340
stlearyhttps://github.com/stleary
JSON-javahttps://github.com/stleary/JSON-java
Codehttps://github.com/stleary/JSON-java
Issues19 (19)https://github.com/stleary/JSON-java/issues
Pull requestshttps://github.com/stleary/JSON-java/pulls
Actionshttps://github.com/stleary/JSON-java/actions
Projectshttps://github.com/stleary/JSON-java/projects
Wikihttps://github.com/stleary/JSON-java/wiki
Security and quality1 (1)https://github.com/stleary/JSON-java/security
Insightshttps://github.com/stleary/JSON-java/pulse
https://github.com/stleary/JSON-java
New issuehttps://github.com/login?return_to=https://github.com/stleary/JSON-java/issues/340
New issuehttps://github.com/login?return_to=https://github.com/stleary/JSON-java/issues/340
Performance & Code Style, avoid passing iterators aroundhttps://github.com/stleary/JSON-java/issues/340#top
https://github.com/TheMatthew
TheMatthewhttps://github.com/TheMatthew
on May 22, 2017https://github.com/stleary/JSON-java/issues/340#issue-230263075
@johnjaylwardhttps://github.com/johnjaylward
#337https://github.com/stleary/JSON-java/pull/337
https://github.com/johnjaylward
johnjaylwardhttps://github.com/johnjaylward
on May 22, 2017https://github.com/stleary/JSON-java/issues/340#issuecomment-302979804
https://github.com/stleary
stlearyhttps://github.com/stleary
on May 22, 2017https://github.com/stleary/JSON-java/issues/340#issuecomment-302982934
https://github.com/stleary/JSON-java/wiki/FAQhttps://github.com/stleary/JSON-java/wiki/FAQ
https://github.com/johnjaylward
johnjaylwardhttps://github.com/johnjaylward
on May 22, 2017https://github.com/stleary/JSON-java/issues/340#issuecomment-302999584
@stlearyhttps://github.com/stleary
https://github.com/stleary
stlearyhttps://github.com/stleary
on May 23, 2017https://github.com/stleary/JSON-java/issues/340#issuecomment-303284672
#341https://github.com/stleary/JSON-java/pull/341
stlearyhttps://github.com/stleary
completedhttps://github.com/stleary/JSON-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 23, 2017https://github.com/stleary/JSON-java/issues/340#event-1092926676
Sign up for freehttps://github.com/signup?return_to=https://github.com/stleary/JSON-java/issues/340
Sign in to commenthttps://github.com/login?return_to=https://github.com/stleary/JSON-java/issues/340
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

Viewport: width=device-width


URLs of crawlers that visited me.