Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory issue with large modules on Linux for Swift 4.2 #559
We have a server-side project (using SPM) and have a script to generate documentation for it. However, when trying to migrate to Swift 4.2 (from 4.1.2), we noticed that in our docker container on CI, the documentation couldn't be generated anymore for one of the modules (the other modules in our project worked fine). Basically, what happened was that the documentation generation started becoming very slow after ca. 30-40 files and then ended up being killed. That problem does not appear on macOS.
This behaviour suggests some kind of memory issue, either a leak, or just an inefficient use of memory (maybe on large modules, some intermediate information could be stored on disk?).
To reproduce this issue I created a silly repository with a single module that has 2001 source files—all of them very simple, one
In the linked repository, the issue can be reproduced by running everything inside a container (just by using
This doesn't happen on my mac (just test with
We can also test the issue on the Swift 4.1 release (
Now, of course I'm not sure if I'm on the right track here and/or if this is a sourcekitten issue or a bug in SourceKit.