On Mon, Jul 11, 2016 at 01:17:54PM +0200, Ancor Gonzalez Sosa wrote: > On 07/11/2016 01:12 PM, Ancor Gonzalez Sosa wrote: > > On 07/07/2016 07:38 PM, Ladislav Slezak wrote: > >> > >> A quick scan found out that the place which consumes most memory is > >> > >> /usr/share/YaST2/lib/installation/ssh_config_file.rb:45:STRING: count: 4, > >> total size: 274056 > >> > >> which loads the SSH keys and configuration from the previous installation > >> and needs > >> about 270kB memory.
Is that the largest allocation, or the largest persistent (leaked) allocation? IMHO we do not need to care if the memory is freed soon enough. > >> > >> The question is we can optimize it better, the SSH keys actually need to > >> be stored > >> somewhere as the target partition will be reformatted... > > > > A quite trivial modification would be to change SshConfigFile#content > > and SshKey::KeyFile#content to store the content of the files in a > > temporary file and not in memory. It should be completely harmless, > > since that code is new, sane and covered by unit tests. > > Imo just made me notice that a temporary file is memory as well. Never > mind. I said nothing. ;-) But a temporary file can be deleted and the memory reused (I hope). Which may be easier than convincing Ruby to let go of all the references. -- Martin Vidner, YaST Team http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
signature.asc
Description: Digital signature
