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

Expose a function that clears the type engine #2290

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

mohammadfawaz
Copy link
Contributor

@mohammadfawaz mohammadfawaz commented Jul 11, 2022

When running the E2E tests, the type engine (implemented as a lazy static) for each test is kept in memory until the cargo run process is done. This was not causing any issues until 1e72bab. This PR fixes that by exposing a function that clears lazy statics (only the type engine for now). This is a bandaid fix for now. There are two things that need to be done:

  1. Move the type engine into a "context" that is passed around instead of a lazy static. I believe this work is being tracked as part of the collection context work.
  2. Investigate the algorithm introduced in 1e72bab to figure out why is it causing the type engine to blow up in size: Investigate the large memory usage introduced in #1958 #2291

@mohammadfawaz mohammadfawaz added compiler General compiler. Should eventually become more specific as the issue is triaged forc labels Jul 11, 2022
@mohammadfawaz mohammadfawaz marked this pull request as ready for review July 11, 2022 17:48
@mohammadfawaz mohammadfawaz requested review from a team July 11, 2022 17:48
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR, I observed a maximum of 9.6GB memory usage on local while running the test suite for #2283. With this merged to #2283, maximum memory usage is 507MB.

@mohammadfawaz mohammadfawaz merged commit e51e639 into master Jul 11, 2022
@mohammadfawaz mohammadfawaz deleted the mohammadfawaz/clear_lazy_statics branch July 11, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged forc
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants