Improved memory usage on writing storage from/to fs/database.

This commit is contained in:
Martin Edenhofer 2017-06-17 00:54:20 +02:00
parent d93d404902
commit 6f349abcbe

View file

@ -116,7 +116,9 @@ nice move to keep system responsive
adapter_source = load_adapter("Store::Provider::#{source}") adapter_source = load_adapter("Store::Provider::#{source}")
adapter_target = load_adapter("Store::Provider::#{target}") adapter_target = load_adapter("Store::Provider::#{target}")
Store::File.all.each { |item| file_ids = Store::File.all.pluck(:id)
file_ids.each { |item_id|
item = Store::File.find(item_id)
next if item.provider == target next if item.provider == target
content = item.content content = item.content