Slow workspace initialization and manifest loading from a GUI app

Hi, I imported spm as a library to build a tool using the manager and noticed that it takes about 6s to initialize a workspace and about 17s to load package manifest from the GUI app I figured out, that workspace loading is longer when initializing ManifestLoader. Does anyone has tips on improving the performance? (I probably may build an underlying CLI for my GUI app to interact with the SPM library, but I'd like to find out a way to interact with spm code directly, instead of dealing with multiprocess communication of my tools)

1 Like

I tried to launch the CLI from the GUI app, but it's as slow as using spmlib code directly. Actually, I'm trying to list packages in the specified folder and it's subfolders. I create a Workspace for reach Package.swift I find and I reduced workspace initialization time by initializing UserToolchain befrore I iterate through folders and I reuse the same toolchain for each workspace, but manifest loading is still too long, the main bottleneck seems to be PackageLoading/ManifestLoader.swift:244 (self.parseAndCacheManifest(...))

Terms of Service

Privacy Policy

Cookie Policy