https://github.com/ku1ik/ecto-preload-bug
Example project for demonstrating Ecto preload bug
https://github.com/ku1ik/ecto-preload-bug
Last synced: 3 months ago
JSON representation
Example project for demonstrating Ecto preload bug
- Host: GitHub
- URL: https://github.com/ku1ik/ecto-preload-bug
- Owner: ku1ik
- Created: 2020-05-08T10:41:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-20T15:20:37.000Z (about 5 years ago)
- Last Synced: 2025-01-20T03:53:38.719Z (5 months ago)
- Language: Elixir
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To reprodue the bug:
1. `git clone [email protected]:sickill/ecto-preload-bug.git`
2. `cd ecto-preload-bug`
3. `mix do deps.get, ecto.create, ecto.migrate`
4. `iex -S mix`In iex run following commands:
5. `:observer.start`, switch to "Load Charts" tab
6. `PreloadBug.once` - this preloads once, no memory spike should be observed
7. `PreloadBug.twice` - this runs the same preload on alrady preload schema - observe huge memory spike, ~1 GB in this example project. In the project I discovered it we see 3-5 GB spike.
8. `PreloadBug.twice_not_in_parallel` - same as above but explicitly disable parallel loading - no memory spike!