You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2008/04/07 17:52:55 UTC
[Bug 5880] New: MEMORY: Net::DNS "sec" module can use up 5 megs of
ram per process needlessly
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5880
Summary: MEMORY: Net::DNS "sec" module can use up 5 megs of ram
per process needlessly
Product: Spamassassin
Version: 3.2.4
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P5
Component: spamc/spamd
AssignedTo: dev@spamassassin.apache.org
ReportedBy: nick@cpanel.net
./DNS
./DNS/SEC
./DNS/SEC/Private.pm
./DNS/Update.pm
./DNS/RR
./DNS/RR/NSEC.pm
./DNS/RR/DS.pm
./DNS/RR/SIG.pm
./DNS/RR/NXT.pm
./DNS/RR/RRSIG.pm
./DNS/RR/KEY.pm
./DNS/RR/DNSKEY.pm
./DNS/SEC.pm
I usually create a sandbox for these files and unshift it into the @INC path.
and
just do
package Net::DNS::Sec::Private;
1;
So Net::DNS will just load stubs.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 5880] MEMORY: Net::DNS "sec" module can use up 5 megs of ram
per process needlessly
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5880
--- Comment #1 from J. Nick Koston <ni...@cpanel.net> 2008-04-16 20:55:46 PST ---
Mucking about with $INC might be a better option here.
$INC{'DNS/SEC/Private.pm'} = 'stub';
$INC{'DNS/Update.pm'} = 'stub';
$INC{'DNS/RR/NSEC.pm'} = 'stub';
...
I'm not sure what is the best way to make this maintainable in the future
though. The savings is pretty substantial however since there are a lots of
dependency modules that no longer get uselessly loaded.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 5880] MEMORY: Net::DNS "sec" module can use up 5 megs of ram
per process needlessly
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5880
--- Comment #2 from Justin Mason <jm...@jmason.org> 2008-04-17 01:47:58 PST ---
it might be worth taking it upstream to Net::DNS -- e.g. a parameter we can set
in the Net::DNS namespace, $Net::DNS::SUPPORT_DNSSEC = 0.
they already lazy-load and conditionally evaluate code based on the presence of
Net::DNS::SEC module -- adding a boolean check to that would be relatively
easy.
BEGIN {
$DNSSEC = eval {
local $SIG{'__DIE__'} = 'DEFAULT';
require Net::DNS::SEC;
1
} ? 1 : 0;
}
(note that since it's a BEGIN block we can't use the nicer "parameter to
constructor" idiom without some heavier code changes there though.)
in my experience the Net::DNS maintainers have been quite good about
responsiveness to patches....
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.