{"id":17743143,"url":"https://github.com/julien-r44/bench-jsdoc-overhead","last_synced_at":"2025-08-05T06:14:41.067Z","repository":{"id":237416507,"uuid":"736930872","full_name":"Julien-R44/bench-jsdoc-overhead","owner":"Julien-R44","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-29T09:43:43.000Z","size":373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T15:25:53.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Julien-R44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["julien-r44"],"polar":"Julien-R44"}},"created_at":"2023-12-29T09:40:15.000Z","updated_at":"2023-12-29T09:43:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4ff019e-67d0-4359-9cb6-e83f91bfa4b1","html_url":"https://github.com/Julien-R44/bench-jsdoc-overhead","commit_stats":null,"previous_names":["julien-r44/bench-jsdoc-overhead"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Julien-R44/bench-jsdoc-overhead","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fbench-jsdoc-overhead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fbench-jsdoc-overhead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fbench-jsdoc-overhead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fbench-jsdoc-overhead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Julien-R44","download_url":"https://codeload.github.com/Julien-R44/bench-jsdoc-overhead/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Julien-R44%2Fbench-jsdoc-overhead/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268845235,"owners_count":24316167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T05:42:45.310Z","updated_at":"2025-08-05T06:14:41.024Z","avatar_url":"https://github.com/Julien-R44.png","language":"JavaScript","funding_links":["https://github.com/sponsors/julien-r44","https://polar.sh/Julien-R44"],"categories":[],"sub_categories":[],"readme":"# bench-jsdoc-overhead\n\nThis repo was created in order to see if adding JSDoc to a project could have an overhead on the loading time of an application in NodeJS.\n\nSo far, it seems that the overhead is not significant at all.\n\nThe benchmark is done the following way:\n\n- Generate two files with 5000 methods each, one with JSDoc, one without ( see [generated files](./generated/) )\n- Just import the files in a NodeJS script and compare with hyperfine :\n\n```sh\nhyperfine --warmup 10 --style color \"node benchmarks/load_js_doc.js\" \"node benchmarks/load_without_js_doc.js\"\n```\n\nUsing 5000 methods, we get the following results:\n\n```sh\nBenchmark 1: node benchmarks/load_js_doc.js\n  Time (mean ± σ):      50.3 ms ±   1.4 ms    [User: 37.6 ms, System: 28.9 ms]\n  Range (min … max):    48.9 ms …  59.1 ms    57 runs\n  \nBenchmark 2: node benchmarks/load_without_js_doc.js\n  Time (mean ± σ):      48.1 ms ±   3.2 ms    [User: 37.4 ms, System: 25.1 ms]\n  Range (min … max):    45.8 ms …  66.2 ms    59 runs\n  \nSummary\n  node benchmarks/load_without_js_doc.js ran\n    1.05 ± 0.08 times faster than node benchmarks/load_js_doc.js\n```\n\nResults indicate a mostly negligible difference in load times between files with and without JSDoc comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulien-r44%2Fbench-jsdoc-overhead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulien-r44%2Fbench-jsdoc-overhead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulien-r44%2Fbench-jsdoc-overhead/lists"}