Closed jarbus closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
3125353
) 78.45% compared to head (77d67a0
) 81.97%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the review @ericphanson, committed the changes you suggested!
This looks great, thanks. I've also added some minor comments and questions.
All great feedback so far, I've learned an unexpected amount about Julia from this simple PR. Thanks!
Do you want another review? I can ask a person in our group that recently implemented some serialisation things for some other cache structures that we have in our code, but he is only available from Friday onwards. I am also fine with having this merged as is.
I'm fine with either, doesn't hurt to get another set of eyes on it and I've already pointed all my code to my branch anyways
Woops, seems like I was too fast in suggesting the while loop to for loop change, the iterator indeed only returns the values, not the nodes themselves. My apologies!
Thanks for the in-depth feedback @lkdvos! I'll look into implementing your suggested refactor. Also I suppose I need to undo that last commit now as well haha
@lkdvos Finished working on your recommended changes, serialization code is much cleaner now. Thanks for your input!
Looks good to me; maybe @lkdvos can take a final look and then we can merge.
Good point, honestly not sure how to handle the multiple references to mutable values case, though.
The regular serializer handles it, so I was hoping it would just work
Great feedback @ericphanson, worked as expected. I was able to clean everything up, code is much nicer now.
@Jutho @ericphanson are there any other changes you recommend before merging?
Sorry, forgot about this. I think it’s good to go!
Fixes #45, where serialization of large LRU might result in a stack overflow. Does not automatically load Serialization, but uses extensions to overwrite Serialization.{serialize,deserialize} if Serialization is loaded, available in julia 1.9+.