Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Put method memory leak #37

Closed
GedSni opened this issue Jun 15, 2018 · 1 comment
Closed

Put method memory leak #37

GedSni opened this issue Jun 15, 2018 · 1 comment

Comments

@GedSni
Copy link

GedSni commented Jun 15, 2018

Hello, put/putFileAs methods might be leaking memory. Using mentioned methods in a looped command increases used memory every iteration. Used memory in every iteration:

4640056
13303408
21298416

Memory usage testing with Tinker:

>>> memory_get_usage()
=> 15369200
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18014216
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18016440
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18018664
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18020888
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18023112
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18025336
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18027560
>>> \Storage::disk('tmp')->put('a', str_repeat("b", 1024*1024))
=> true
>>> memory_get_usage()
=> 18029784

Not using the mentioned methods does not increase used memory every iteration.

@nicja
Copy link
Contributor

nicja commented Apr 18, 2019

This is not an issue in this library, but one of the upstream dependencies. Please report as appropriate. Thanks

@nicja nicja closed this as completed Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants