Title: Large Memory and Speed performance regression from 2.5.3 to 2.6.3 · Issue #122 · pythonicrubyist/creek · GitHub
Open Graph Title: Large Memory and Speed performance regression from 2.5.3 to 2.6.3 · Issue #122 · pythonicrubyist/creek
X Title: Large Memory and Speed performance regression from 2.5.3 to 2.6.3 · Issue #122 · pythonicrubyist/creek
Description: We upgraded to rails 7.1.3 and at the same time I upgraded our version of creek from 2.5.3 to 2.6.3. After deploying the new rails version, we noticed our memory usage going up significantly as well as our time to process spreadsheets. I...
Open Graph Description: We upgraded to rails 7.1.3 and at the same time I upgraded our version of creek from 2.5.3 to 2.6.3. After deploying the new rails version, we noticed our memory usage going up significantly as wel...
X Description: We upgraded to rails 7.1.3 and at the same time I upgraded our version of creek from 2.5.3 to 2.6.3. After deploying the new rails version, we noticed our memory usage going up significantly as wel...
Opengraph URL: https://github.com/pythonicrubyist/creek/issues/122
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Large Memory and Speed performance regression from 2.5.3 to 2.6.3","articleBody":"We upgraded to rails 7.1.3 and at the same time I upgraded our version of creek from 2.5.3 to 2.6.3.\r\n\r\nAfter deploying the new rails version, we noticed our memory usage going up significantly as well as our time to process spreadsheets.\r\n\r\n~~I tested the two versions in irb isolation and saw no difference, with a slight improvement for 2.6.3~~. However, when in docker the difference is massive.\r\n\r\n(See https://github.com/pythonicrubyist/creek/issues/122#issuecomment-1957764405, my testing methodology wasn't great for local Mac and the difference is less but still large. This is not just docker)\r\n\r\n```ruby\r\n[3] [app][development] pry(main)\u003e Creek::VERSION\r\n=\u003e \"2.5.3\"\r\n[4] [app][development] pry(main)\u003e time = Time.now; creek = Creek::Book.new('performance-test.xlsx'); puts(Time.now - time);\r\n8.105815712\r\n[5] [app][development] pry(main)\u003e time = Time.now; creek.sheets[0].simple_rows.map(\u0026:inspect); puts(Time.now - time);\r\n38.974233879\r\n[6] [app][development] pry(main)\u003e\r\n```\r\n\r\n```\r\nVmPeak:\t 709908 kB\r\nVmSize:\t 593128 kB\r\nVmLck:\t 0 kB\r\nVmPin:\t 0 kB\r\nVmHWM:\t 616644 kB\r\nVmRSS:\t 518568 kB\r\nVmData:\t 559256 kB\r\nVmStk:\t 8188 kB\r\nVmExe:\t 4 kB\r\nVmLib:\t 24516 kB\r\nVmPTE:\t 1372 kB\r\nVmSwap:\t 0 kB\r\n```\r\n\r\n```ruby\r\n[1] [app][development] pry(main)\u003e Creek::VERSION\r\n=\u003e \"2.6.3\"\r\n[2] [app][development] pry(main)\u003e time = Time.now; creek = Creek::Book.new('performance-test.xlsx'); puts(Time.now - time);\r\n8.186497337\r\n[3] [app][development] pry(main)\u003e time = Time.now; creek.sheets[0].simple_rows.map(\u0026:inspect); puts(Time.now - time);\r\n66.137462044\r\n[4] [app][development] pry(main)\u003e\r\n```\r\n\r\n```\r\nVmPeak:\t 3852528 kB\r\nVmSize:\t 603644 kB\r\nVmLck:\t 0 kB\r\nVmPin:\t 0 kB\r\nVmHWM:\t 3765544 kB\r\nVmRSS:\t 529308 kB\r\nVmData:\t 569772 kB\r\nVmStk:\t 8188 kB\r\nVmExe:\t 4 kB\r\nVmLib:\t 24516 kB\r\nVmPTE:\t 1520 kB\r\nVmSwap:\t 0 kB\r\n```\r\n\r\nAs you can see in the above, the problem appears to be the row generator. Also, the peak memory usage went from 709,000 KB to 3,852,000 KB, 5 times more memory!\r\n\r\nHere is the spreadsheet I used for testing (a subset of chicago's public crime data) https://drive.usercontent.google.com/download?id=1zWiCRYCS7Vs9EPZyOqcKr-eT59F7w3dm\u0026export=download (give it a minute to start downloading, google has to virus scan it first and it takes forever)\r\n","author":{"url":"https://github.com/azrazalea-debtbook","@type":"Person","name":"azrazalea-debtbook"},"datePublished":"2024-02-21T03:21:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/122/creek/issues/122"}
| 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:53b39252-ab8d-6830-d85c-228d7e74fd76 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9360:3F5F77:9D86BBD:D0E59AE:696E1334 |
| html-safe-nonce | 0150c21ed8c259acc930226e3602939bf68a55fb86b24c6da6c5b2964de8fb57 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzYwOjNGNUY3Nzo5RDg2QkJEOkQwRTU5QUU6Njk2RTEzMzQiLCJ2aXNpdG9yX2lkIjoiNjU3NjA2NzkzMjM5ODE2Mjc0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9df04fdd828283b0c461e7682845b805f31d24fd31df8e72676d1647476f61c3 |
| hovercard-subject-tag | issue:2145724656 |
| 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/pythonicrubyist/creek/122/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b0cc7543d40cb5ebf115cf1aed175738e4be4a01084ff1df687237f488c892a/pythonicrubyist/creek/issues/122 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b0cc7543d40cb5ebf115cf1aed175738e4be4a01084ff1df687237f488c892a/pythonicrubyist/creek/issues/122 |
| og:image:alt | We upgraded to rails 7.1.3 and at the same time I upgraded our version of creek from 2.5.3 to 2.6.3. After deploying the new rails version, we noticed our memory usage going up significantly as wel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | azrazalea-debtbook |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a7d6d739bf034e67486b9f97a31887ca30302b72a0acac49b6bcddff34356d7 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonicrubyist/creek git https://github.com/pythonicrubyist/creek.git |
| octolytics-dimension-user_id | 1863594 |
| octolytics-dimension-user_login | pythonicrubyist |
| octolytics-dimension-repository_id | 10825818 |
| octolytics-dimension-repository_nwo | pythonicrubyist/creek |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 10825818 |
| octolytics-dimension-repository_network_root_nwo | pythonicrubyist/creek |
| 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 | 87d7872ec7094ed247923539669aabda9230966f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width