Code review comment for lp:~free.ekanayaka/landscape-client/release-upgrade-logs

Jamu Kakar (jkakar) wrote :

[1]

+ def make_operation_result_text(self, out, err):

This method should be using a StringIO internally to avoid copying
strings. This will help with memory use.

[2]

As I recall, Andreas mentioned that the log files are fairly small,
less than 60kb. I think it's probably okay to load them into
memory. That said, as Sidnei suggests, it would be good to put a
safety check in the read_file function and only loads the last N
bytes. N can default to a fairly large number, like 100kb.

review: Needs Fixing

« Back to merge proposal