snapcraft prerequites are slow to resolve

Bug #1590599 reported by Michael Hall
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

In large projects with many parts, resolving prerequisites can be extremely slow. I have attached the snapcraft.yaml for building kdevelop. After a full build and without cleaning, I ran "snapcraft stage" under a profiler. This was essentially a noop command, but the prerequisite checking took more than 10 minutes.

Also attacked is the output from "snapcraft stage" which show only prerequisite resolution and skipping steps. Also attached is the profiler output showing the top 100 lines in terms of time used, as well as the top 100 function calls by count.

Tags: eco-team
Revision history for this message
Michael Hall (mhall119) wrote :
Revision history for this message
Michael Hall (mhall119) wrote :
Revision history for this message
Michael Hall (mhall119) wrote :
Revision history for this message
Scarlett Gately Moore (scarlettmoore) wrote :

I don't know how much it will help, but I am taking a different approach, and adding a misc part and adding all the build-packages for all the parts there so that apt will only be used for the misc, qt, and frameworks parts, rather than for every part. This will all be better when snaps can use libraries from other snaps as then I will build a snap for each framework and we only need to pull in the required pre-built frameworks snaps that are needed. When I tried to put each framework as a part it was a spectacular level of fail as the dependency chain was enormous.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1590599] Re: snapcraft prerequites are slow to resolve

I think we can plan to make a snap of the KDE framework stack which is
maintained by Ubuntu and can safely be used by other snaps. We don't yet
have the content-sharing interface, but as soon as we do, we can make a
kde-base snap which provides a full set of libraries that apps can just use.

Generally we avoid cross-vendor sharing of libraries, but in the case of
something fundamental like KDE it makes sense to trust the community
process to produce something of high quality that everyone can depend
on. Apps can individually choose how much of that they link to
dynamically, vs static linking or library bundling in their own snaps.

Mark

On 09/06/16 09:54, Scarlett Gately Clark wrote:
> I don't know how much it will help, but I am taking a different
> approach, and adding a misc part and adding all the build-packages for
> all the parts there so that apt will only be used for the misc, qt, and
> frameworks parts, rather than for every part. This will all be better
> when snaps can use libraries from other snaps as then I will build a
> snap for each framework and we only need to pull in the required pre-
> built frameworks snaps that are needed. When I tried to put each
> framework as a part it was a spectacular level of fail as the dependency
> chain was enormous.
>

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Nice, I love bug reports that really push the limits of the system. Snapcraft should obviously be handling this better; barring the library snap discussion, snaps are supposed to include their dependencies. Snapcraft should not be unwieldy when trying to do that for a large system. I'll investigate this.

Thanks for the great bug Michael-- I appreciate the profile as well.

Changed in snapcraft:
assignee: nobody → Kyle Fazzari (kyrofa)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: Kyle Fazzari (kyrofa) → Sergio Schvezov (sergiusens)
milestone: none → 2.18
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Evan (ev)
tags: added: eco-team
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.