What's a reasonnable time to run dokka on ~30k lin...
# dokka
m
What's a reasonnable time to run dokka on ~30k lines of kotlin ? It currently takes ~30min on my machine and ~1h in CI, that looks very long. Or is that standard times ?
s
That sounds quite slow indeed. We have dokka set up in Arrow I can run it to compare if you like.
m
Other datapoints would be great
s
Cloc result. I am running dokka now
m
On my side:
Copy code
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Kotlin                         414           6294           2489          29390
XML                            314           1243            231          21194
JSON                             1              0              0            104
I'm using the gradle plugin on an Android module. I have one CPU core running 100%.
s
I have 5 CPUs jumping to 80%+ immediately lol
6*
First try I ran into a dokka bug 😅 We run into this frequently and requires a CI rebuild.
Untitled
m
Interesting.... Updating to 0.9.18 (was 0.9.17 before) allows dokka to grab > 400+% CPU. But it then fails with
org.jetbrains.kotlin.asJava.builder.ClsWrapperStubPsiFactory$1 cannot be cast to com.intellij.psi.PsiJavaFile
Tried running a profiler and it looks like ~47% of the time is spent in GCTaskThread::run, 16% in CompileBroker and "only" 34% in DokkaGenerator.generate...
s
What command did you run for that info?
m
Screenshot at 2019-10-02 16-39-51.png
I attached it during 30s while the gradle task was running
Turns out, applying the
dokka-android
plugin instead of plain
dokka
does the trick. I'm down to ~3-4min which is way more acceptable. Still a bit long for 30k loc IMO but that'll do for now.
ah, maybe not, I also changed the
outputFormat
...
s
I am having a hard time testing it. It fails very frequently locally :s A dokka internal Guice reflection bug 😞
Ah yeah, I am sure dokka-android is heavy but not sure if that’s related to dokka or the Android’s heavy classpath.
m
😕
s
I’m down to ~3-4min
That sounds much more in line with what I see on the Arrow repo considering the difference in size of project.
m
So looks like it was more
outputFormat = "javadoc"
in the end...
I added it again and I'm bad to > 5min build (I just aborted it).
The Edit-Compile-Run cycle is quite long 😅
s
We have a rather funky setup. We have
jekkyl
as
outputFormat
. Which we then run another custom tool over it and we modify the output and build our website from it 😄
s
This currently takes 7 min or 6 files per second.
😱
m
¯\_(ツ)_/¯
I'll open an issue for tracking
👀 1
s
Painful. Writing documentation is hard enough by itself