On Mon, 2023-03-06 at 13:40 +0800, Paul Wise wrote:

> I just profiled needrestart using NYTProf and found that the
> problem is actually caused by the Module::ScanDeps Perl module:

Some ideas from a discussion on #debian-perl about this:

 * Parse the Perl code using PPI instead of Module::ScanDeps
    - Change Module::ScanDeps to use PPI instead?
 * Parse the Perl code using Perl's parsing instead
    - Would require getting Perl upstream to export a module
    - or possibly the libperl might have something?
 * Add a Perl module that exports data about imported code
    - PERL5OPT=-MNeedRestart
    - divert /usr/bin/perl to a script that adds -MNeedRestart
 * Add code to Perl upstream that exports data about imported code

Ultimately though, needrestart shouldn't have to parse code (as root?)
in order to figure out what code a particular interpreter process,
for *any* language (including Perl, Python, shell etc) has loaded.

That will require defining a standard for how the processes should
export that information and then sending patches for all interpreters.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to