mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Cc: "Gieseler, Christian" <CG@eks-engel.de>
Subject: Re: [ptxdist] Speed up targetinstall of certain packages
Date: Fri, 4 Nov 2022 20:12:21 +0100	[thread overview]
Message-ID: <Y2VkFbE8Xl+hcQxf@falbala.internal.home.lespocky.de> (raw)
In-Reply-To: <75f0b7f568884d33af8f5c6bc23bd5dd@eks-engel.de>

[-- Attachment #1: Type: text/plain, Size: 2910 bytes --]

Hello Christian,

Am Fri, Nov 04, 2022 at 03:37:02PM +0000 schrieb Gieseler, Christian:
> Hello,
> 
> I have question regarding the speedup of daily work.
> 
> We have frontend and backend of our webgui deployed with separate packages. Only task of these package is to deploy the files with 
> 
> @$(call install_tree, web-frontend, -, -, $(WEB_FRONTEND_DIR)/var-www/, /var/www/,no)
> 
> Compile and install stages are empty. The just call targetinfo and touch to skip the stages.
> 
> The frontend depends on the backend and the backend obviously depends on our application which is called by the backend. 
> So our web-frontend.in file looks like this:
> ## SECTION=project_specific
> 
> config WEB_FRONTEND
> 	bool
> 	select APP_LAYER
> 	select WEB_BACKEND
> 	prompt "e-mode Web Frontend"
> 	help
> 
> As expected if i clean and compile APP_LAYER the targetinstallstage of Backend and Frontend are executed again. However this is only a Run-Time only dependency. It is a third-party archive and install_tree takes quite some time even on fast build hosts. Even it if is just a minute it is annoying to spend the time waiting during image creation. Trying to solve that i found "if RUNTIME"  für Run-Time only Dependencys in the documentation here:
> 
> https://www.ptxdist.org/doc/daily_work_section.html#controlling-package-dependencies-in-more-detail
> 
> So my expectation would be that if i change the webfrontend.in file like this:
> 
> config WEB_FRONTEND
> 	bool
> 	select APP_LAYER	if RUNTIME
> 	select WEB_BACKEND   if RUNTIME
> 	prompt "e-mode Web Frontend"
> 	help

That sounds reasonable and I would have done it the same.

> The "if RUNTIME" would make sure that the targetinstall stage is not executed again if i just execute a "ptxdist clean app-layer" followed by a "ptxdist images". Same with ptxdist clean root; ptxdist images. It is clear that all targetinstall stages are executed again, but i would expect that the web-frontend is deployed earlier if no build dependency is given.
> 
> Am i missing something, oder is the "if RUNTIME" Switch not working properly in my ptxdist-2018.12 version? Or does it have no effect on targetinstall stages?

Not sure how that should behave.  However if you want to speed up the
build: make sure you call ptxdist with -q or --quiet parameter.  The
output on screen takes suprisingly much time, even with modern
terminals, and especially when doing targetinstall of many many files
(as usually the case with web frontends. been there, done that.)

Greets
Alex

> 
> Thanks for any feedback.
> BR,
> Christian

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-04 19:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 15:37 Gieseler, Christian
2022-11-04 19:12 ` Alexander Dahl [this message]
2022-11-08 10:13   ` Christian Melki
2022-11-08 12:10     ` Christian Melki
2022-11-11 16:08       ` Michael Olbrich
2022-11-11 17:52         ` Christian Melki
2022-11-08 12:50     ` Alexander Dahl
2022-11-08  8:25 ` Michael Olbrich

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=Y2VkFbE8Xl+hcQxf@falbala.internal.home.lespocky.de \
    --to=post@lespocky.de \
    --cc=CG@eks-engel.de \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox