-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: fix space leaks by downgrading fuzzyset to v0.2.4 #3339
Conversation
@laurenceisla How about a test for this? We now have the |
What is a "space leak"? A "memory leak"? Not sure if that's really what happens here. Anyway, I don't understand why this doesn't fail any builds. I remember I tried downgrading fuzzyset, when I worked on allowing GHC 9.8 - and back then it caused other dependencies to need a downgrade, too etc. |
Don't know the details, but it's similar in that it takes more space in memory than it's necessary, but it's freed later.
We had |
|
||
|
||
# See: https://github.com/PostgREST/postgrest/issues/3329 | ||
def test_should_not_fail_with_stack_overflow(defaultenv): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails on the main
branch with "stack overflow".
Just to clarify. It's not a memory leak, is just that we limit the stack size during development to Line 185 in 0d44418
Which forces a More details at https://neilmitchell.blogspot.com/2015/09/detecting-space-leaks.html?m=1 Don't know |
Actually the term was correctly used:
References:
|
Space leak it is, then. Thanks for the explanation / links.
Hm, maybe. I thought I had tried 0.2.4, but maybe I hadn't. There is one problem with just downgrading: This will block us eventually, because certainly the old version won't be updated anymore.
Yes, agreed. I'm a bit worried about how well maintained fuzzyset is, though. There seems to be some recent activity, but for example I can't even find a git tag with |
One more problem with downgrading: This will make it harder / impossible to build But maybe we can / should downgrade temporarily while still reporting the problem upstream. |
Agree, opened an issue there: laserpants/fuzzyset-haskell#9 |
@laurenceisla With this downgrade,
|
Strange. Why did this not fail in CI. I think this was the latest run here: https://github.com/PostgREST/postgrest/actions/runs/8349585526/job/22854079725. Doctests seem fine here. |
On more thought, I think it is some local issue on my side. My bad. |
I'm getting the same errors. @laurenceisla Can you reproduce?
|
@steve-chavez Strange, I'm not getting those errors: [nix-shell:~/Projects/postgrest]$ postgrest-test-doctests
Warning: Both /home/laurence/.cabal and /home/laurence/.config/cabal/config
exist - ignoring the former.
It is advisable to remove one of them. In that case, we will use the remaining
one by default (unless '$CABAL_DIR' is explicitly set).
src/PostgREST/Version.hs:12:1: error:
Could not find module ‘Paths_postgrest’
Perhaps you meant Paths_doctest
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
Examples: 153 Tried: 153 Errors: 0 Failures: 0 Maybe your nix-shell is caching something? |
Ah, right. Just reentering |
Closes #3329.