Swift Documentation Slow - Where To File Issue?

I've been doing some of my Advent of Code work on an oldish laptop that I have Debian on, running the barest of 'desktop' setups (it's just mwm). The CPUs are a little anemic so I'm just working in Vim and XTerms.

This leads to a lack of auto-complete, so I'm actuallly having to interact with the documentation. Much has been said about the content of it, but this is about the performance.

Take this page, looking at the filter function. If I put my mousewheel over the left frame and scroll for one line, Firefox pegs a core for four to six seconds before it loads any more content.

This only seems to affect the function and type documentation. The language documentation is fairly snappy in comparison.

Happy to post an issue, but it's not immediately obvious to me where it belongs, as Apple hosts it.

Specs, for the morbidly curious
% /mnt/storage/apps/firefox/firefox --version
Mozilla Firefox 133.0.3

% lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

% free -h
               total        used        free      shared  buff/cache   available
Mem:           7.2Gi       2.7Gi       2.6Gi       4.9Mi       2.1Gi       4.4Gi
Swap:          976Mi          0B       976Mi

% cat /proc/cpuinfo
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 112
model name	: AMD A6-9220 RADEON R4, 5 COMPUTE CORES 2C+3G
stepping	: 0
microcode	: 0x6006705
cpu MHz		: 1606.690
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 16
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed ibpb_no_ret
bogomips	: 4990.19
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro acc_power [13]

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 112
model name	: AMD A6-9220 RADEON R4, 5 COMPUTE CORES 2C+3G
stepping	: 0
microcode	: 0x6006705
cpu MHz		: 1657.387
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 17
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed ibpb_no_ret
bogomips	: 4990.19
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro acc_power [13]

(Edit: Even on an M2 mac, it's not great. Seems like that entire view is redrawn every time it's moved.)

1 Like

The relevant project is GitHub - swiftlang/swift-docc-render: Web renderer for Swift-DocC documentation. - the project that holds the Vue.js app that's embedded into and used to render output from documentation archives.

The link to that project's issue list: Issues · swiftlang/swift-docc-render · GitHub

1 Like

Thanks for the pointer. I've opened an issue. Without knowing anything about anything, this looks like it might be related but I couldn't be sure.

I'm not familiar enough with the specifics to know, but it could be. I have seen that fix for the slowness bug has been made, and should be out in the next major dot release of swift. (The render app is embedded into the toolchain as a part of Docc, so it gets released and updated on the same cadence as the overall swift toolchains)