From: Nigel Cunningham <nigel@tuxonice.net>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] PM: Compress hibernation image with LZO
Date: Mon, 23 Aug 2010 07:52:48 +1000 [thread overview]
Message-ID: <4C719C30.4060902@tuxonice.net> (raw)
In-Reply-To: <201008222147.22784.rjw@sisk.pl>
Hi.
On 23/08/10 05:47, Rafael J. Wysocki wrote:
> On Saturday, August 21, 2010, Nigel Cunningham wrote:
>> Hi.
>>
>> Sorry for being slow to reply, but to my mind, having two copies of the
>> whole save and load routines is just plain ugly and makes
>> maintainability a nightmare.
>
> Well, how much code is actually duplicated by having separate
> routines for with and without compression? I don't think it's too much.
>
>> Every time I've thought there's been a problem with compression or
>> decompression, it has turned out to be a problem in my code instead.
>> Let's not waste time and effort duplicating code unnecessarily.
>
> Having two separate functions for image saving/restoring, depending on cartain
> condition, is not wrong in principle as long as they are sufficiently different.
> So going back to the previous question, aren't they?
>
> An alternative is to put several conditionals into a sensitive piece of code,
> which I'd rather prefer to avoid.
I understand that it's better to have them separate if you have them
both. What I'm arguing is that it's pointless to have the two versions
in the first place. We don't normally add options to disable
improvements, and there's no need to do so this time.
Regards,
Nigel
next prev parent reply other threads:[~2010-08-22 21:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 2:29 [PATCH 1/2] PM: Compress hibernation image with LZO Bojan Smojver
2010-08-17 0:52 ` Bojan Smojver
2010-08-17 10:55 ` Rafael J. Wysocki
2010-08-17 13:38 ` Bojan Smojver
2010-08-18 23:02 ` Rafael J. Wysocki
2010-08-18 23:41 ` Bojan Smojver
2010-08-19 9:49 ` Bojan Smojver
2010-08-19 11:11 ` Bojan Smojver
2010-08-20 23:32 ` Rafael J. Wysocki
2010-08-20 12:11 ` Bojan Smojver
2010-08-20 23:36 ` Rafael J. Wysocki
2010-08-21 4:40 ` Bojan Smojver
2010-08-22 19:23 ` Rafael J. Wysocki
2010-08-22 19:29 ` Rafael J. Wysocki
2010-08-22 22:33 ` Bojan Smojver
2010-08-22 23:47 ` Bojan Smojver
2010-08-23 21:43 ` Rafael J. Wysocki
2010-08-23 23:20 ` Bojan Smojver
2010-09-08 23:45 ` Rafael J. Wysocki
2010-09-09 0:08 ` Bojan Smojver
2010-08-21 6:15 ` Nigel Cunningham
2010-08-22 19:47 ` Rafael J. Wysocki
2010-08-22 21:52 ` Nigel Cunningham [this message]
2010-08-19 13:40 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2010-08-05 3:08 Bojan Smojver
2010-08-05 3:38 ` Bojan Smojver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C719C30.4060902@tuxonice.net \
--to=nigel@tuxonice.net \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.