You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(a) 84a3d28 (part of Implement CLI versioning #4316) which "queues up OpamConsole messages if OpamCoreConfig.set has not been called". Now, in my application there's nothing calling OpamCoreConfig.set -- so these messages are queued up forever.
(b) OpamFile.Stats.read_files (a list of strings) getting extended in OpamFile.MakeIO().read_opt - and never gets cleared (nor uniquified)
I was wondering whether for (a) a bounded queue could be used? And for (b), could that be only added if r.print_stats is true -- otherwise these mutable lists are never used. Or could that code be removed entirely, if not used?
FWIW, in Stats.print there's an error:
letprint()=letauxkind=function|[] -> ()|l ->
OpamConsole.msg "%d files %s:\n %s\n"
(List.length !read_files) kind (String.concat "\n" l)
in
aux "read"!read_files;
aux "write"!write_files
The List.length uses always the !read_files - while it should use l.
If you can decide on acceptable ways forward for both (a) and (b), that would be fantastic.
Dear everyone,
thanks for your time to read this bug report.
So, I have an application (https://github.com/hannesm/maintenance-intent-filter) using opam as a library - and discovered there are some heavy memory usages.
The root cause are two things:
I was wondering whether for (a) a bounded queue could be used? And for (b), could that be only added if r.print_stats is true -- otherwise these mutable lists are never used. Or could that code be removed entirely, if not used?
FWIW, in Stats.print there's an error:
The
List.lengthuses always the!read_files- while it should usel.If you can decide on acceptable ways forward for both (a) and (b), that would be fantastic.