Skip to content
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

Ensure gc.collect is not excessively called #3259

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Ensure gc.collect is not excessively called #3259

merged 1 commit into from
Mar 25, 2022

Conversation

philippjfr
Copy link
Member

Currently bokeh will call gc.collect() on every Document.destroy(). If you are cleaning up multiple sessions simultaneously this is excessive and can in fact lock up the server for multiple seconds. Here we override Document.destroy and schedule a separate task that effectively throttles gc.collect calls.

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #3259 (7f89d8d) into master (02acacc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3259   +/-   ##
=======================================
  Coverage   83.14%   83.15%           
=======================================
  Files         195      195           
  Lines       26008    26021   +13     
=======================================
+ Hits        21625    21638   +13     
  Misses       4383     4383           
Impacted Files Coverage Δ
panel/io/state.py 69.34% <ø> (ø)
panel/io/server.py 80.19% <100.00%> (+0.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02acacc...7f89d8d. Read the comment docs.

@philippjfr philippjfr merged commit 2e43510 into master Mar 25, 2022
@philippjfr philippjfr deleted the schedule_gc branch March 25, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant