All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Pantyukhin <apantykhin@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: ojeda@kernel.org, rust-for-linux@vger.kernel.org,
	akpm@linux-foundation.org, Asahi Lina <lina@asahilina.net>
Subject: Re: [PATCH] scripts: avoid redundant re-reading makefiles.
Date: Thu, 5 Jan 2023 23:51:02 +0400	[thread overview]
Message-ID: <CAPi66w-2aV8CQs6xGSR4xZn4+39HdUqvwTZEidYKqUR-11thDA@mail.gmail.com> (raw)
In-Reply-To: <CANiq72=mgZCC7ECEO=bqLQ2rJKQjqS7Sg7CW51_mpX4VcG7o6A@mail.gmail.com>

Hi Miguel.
Please see my comments below.

чт, 5 янв. 2023 г. в 22:44, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>:
>
> Hi Alex,
>
> The commit message is looking better, thank you. Please see comments
> inline below.
>
> On Wed, Jan 4, 2023 at 5:04 PM Alexander Pantyukhin
> <apantykhin@gmail.com> wrote:
> >
> > The main goal of the patch is avoid redundant re-reading makefiles
> > if these were read before. This is performance improvement.
>
> Like it was mentioned in v1, could you please give a rough estimate
> about what is the improvement from old to new? (in particular, without
> the other changes). That way, others can get an idea whether the code
> complexity is worth it or not.

I checked files now. It seems only one place in /samples  has 2 files
with 1 makefile in the parent folder. So it looks like the patch is
untimely for now.

>
> > Additional code improvements are using 'with' when read file and check
> > if file exists.
>
> Note that others submitted an improvement for the missing file case as
> we discussed in v1, so it would be better if they submitted their own
> patches for those. I am Cc'ing them so that they have a chance to be
> aware of this patch and potentially submit theirs.
>
> In any case, their approach seems more idiomatic for Python [1], so I
> think we should do it that way.
>
> Finally, the title of this commit should probably start with the
> "scripts: generate_rust_analyzer: " prefix, otherwise it is a bit too
> broad.

I see, thanks. Still have a question about using "with". Is it reasonable?

>
> Thanks!
>
> Cheers,
> Miguel
>
> [1] https://docs.python.org/3.11/glossary.html#term-EAFP

Thank you!
Best, Alex.

  reply	other threads:[~2023-01-05 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 16:04 [PATCH] scripts: avoid redundant re-reading makefiles Alexander Pantyukhin
2023-01-05 18:44 ` Miguel Ojeda
2023-01-05 19:51   ` Alexander Pantyukhin [this message]
2023-01-05 23:01     ` Miguel Ojeda

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=CAPi66w-2aV8CQs6xGSR4xZn4+39HdUqvwTZEidYKqUR-11thDA@mail.gmail.com \
    --to=apantykhin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=lina@asahilina.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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.