Commit fe4e287
Defer all startup HTTP downloads until after partfile + shared-file scan
The two startup HTTP downloads — the GitHub version check (amule.cpp:669)
and the server.met auto-update (CServerList::Init calling AutoUpdate) —
used to fire synchronously *before* the heavy local I/O in
CamuleApp::OnInit (downloadqueue->LoadMetFiles + sharedfiles->Reload).
On nodes with a large library this is up to a minute of saturated main
thread. The wxWebSession worker thread that pumps libcurl's state
machines competes for CPU with that main thread, libcurl's per-handle
timeout / retry logic advances less, and DNS resolution can wall-clock
out before it ever gets a chance to complete.
Stoatwblr's startup log on #714 is the empirical confirmation: same
hostname (upd.emule-security.org), same wxWebRequest backend, parallel
execution — server.met fired before the 91k-shared-file scan and timed
out after 48.8s; ipfilter.zip fired from a post-Reload main-thread
event and downloaded in 3s.
Move both kicks past sharedfiles->Reload so they fire with the main
thread idle. CServerList::Init is split so the disk load + static-server
load still run early (needed before ServerConnect), but the
AutoServerlist HTTP kick is exposed as StartAutoUpdate() for the caller
to invoke later. IPFilter's auto-update is already correctly deferred
via its post-Reload main-thread event and is unchanged. The
first-launch bootstrap-download block at amule.cpp:736 is already past
the heavy I/O and is also unchanged.
Refs #714.1 parent 5c0a88f commit fe4e287
3 files changed
Lines changed: 52 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
677 | 670 | | |
678 | 671 | | |
679 | 672 | | |
| |||
711 | 704 | | |
712 | 705 | | |
713 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
714 | 727 | | |
715 | 728 | | |
716 | 729 | | |
| |||
0 commit comments