Title: ExtensionBasedMapper is slow for large directories · Issue #333 · CommunitySolidServer/CommunitySolidServer · GitHub
Open Graph Title: ExtensionBasedMapper is slow for large directories · Issue #333 · CommunitySolidServer/CommunitySolidServer
X Title: ExtensionBasedMapper is slow for large directories · Issue #333 · CommunitySolidServer/CommunitySolidServer
Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). (same as in #332) Every request to a single file takes 1 - 1,5 seconds, which is quite long. The root cause seems to reading the directo...
Open Graph Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). (same as in #332) Every request to a single file takes 1 - 1,5 seconds, which is quite long. The...
X Description: I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). (same as in #332) Every request to a single file takes 1 - 1,5 seconds, which is quite long....
Opengraph URL: https://github.com/CommunitySolidServer/CommunitySolidServer/issues/333
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ExtensionBasedMapper is slow for large directories","articleBody":"I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). (same as in #332)\r\nEvery request to a single file takes 1 - 1,5 seconds, which is quite long.\r\n\r\nThe root cause seems to reading the directory upon every request: https://github.com/solid/community-server/blob/master/src/storage/ExtensionBasedMapper.ts#L97\r\n\r\nSince this mapper depends on globbing, there's probably no good way around this.\r\nA partial solution might be to place an (LRU-)cache over `readdir`, but this may then lead to memory issues for many large directories.\r\n\r\nAlternatively, a set of whitelisted extensions could be configured, so that the mapper can loop over these extensions, which would allow specific files to be tested instead of reading the whole directory.\r\nDownside is that these extensions would have to be preconfigured, so we'd lose generality (would solve my use case here though 😄).\r\n\r\nSo I guess this performance issue with large directories is inherent to this mapping strategy,\r\nand probably just needs to be documented as a warning.","author":{"url":"https://github.com/rubensworks","@type":"Person","name":"rubensworks"},"datePublished":"2020-11-18T13:51:42Z","url":"https://github.com/CommunitySolidServer/CommunitySolidServer/issues/333"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7cfe3ed-6b27-6c7f-bea3-1e29a02cedb3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D552:1D3276:2178A5:2D2A37:6B03C802 |
| html-safe-nonce | 9ebf5d732af9c0059ca5e0dfd2164e0cb1ef97df085711ffea7e8557f0b90378 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTUyOjFEMzI3NjoyMTc4QTU6MkQyQTM3OjZCMDNDODAyIiwidmlzaXRvcl9pZCI6IjMzMTI2OTcyNzc3ODg5NjQ4NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d5502463bdeedcdc7f905b0f24676c3dbbe3802fea98074ba6b3dbd28681412e |
| hovercard-subject-tag | issue:745678360 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/CommunitySolidServer/CommunitySolidServer/333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64b7f40d60d151d93fbaf0851260f4bfb1747fe05375f894c01b6765a446c250/CommunitySolidServer/CommunitySolidServer/issues/333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64b7f40d60d151d93fbaf0851260f4bfb1747fe05375f894c01b6765a446c250/CommunitySolidServer/CommunitySolidServer/issues/333 |
| og:image:alt | I've setup the server over a directory with 309.978 very small N-Quads files (~10 triples per file). (same as in #332) Every request to a single file takes 1 - 1,5 seconds, which is quite long. The... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rubensworks |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/CommunitySolidServer/CommunitySolidServer git https://github.com/CommunitySolidServer/CommunitySolidServer.git |
| octolytics-dimension-user_id | 101397807 |
| octolytics-dimension-user_login | CommunitySolidServer |
| octolytics-dimension-repository_id | 265197208 |
| octolytics-dimension-repository_nwo | CommunitySolidServer/CommunitySolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 265197208 |
| octolytics-dimension-repository_network_root_nwo | CommunitySolidServer/CommunitySolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width