public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
@ 2006-04-13 7:44 rspencer at x10sys dot com
2006-04-13 7:48 ` [Bug c++/27140] " rspencer at x10sys dot com
` (13 more replies)
0 siblings, 14 replies; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-13 7:44 UTC (permalink / raw)
To: gcc-bugs
I'm compiling the LLVM compiler infrastructure and have noticed that GCC 4.1
takes an excessively long time to compile versus GCC 4.0. In particular, one
file (albeit 2 million source lines) takes over 10 minutes (618.97 seconds) of
CPU time to compile. On the exact same source, GCC 4.0.2 takes just over 2
minutes (130.68 seconds). GCC 3.4 was even faster (from memory).
Here are the heavy-hitters (from -ftime-report) from highest to lowest:
usr sys wall mem
tree SSA incremental : 172.76 (30%) 0.61 ( 1%) 175.39 (22%) 9356kB ( 1%)
ggc
tree PHI insertion : 55.86 (10%) 0.30 ( 1%) 57.54 ( 7%) 6346kB ( 1%)
ggc
dominance frontiers : 40.15 ( 7%) 0.10 ( 0%) 40.02 ( 5%) 0kB ( 0%)
ggc
dominator optimization: 24.50 ( 4%) 0.57 ( 1%) 34.06 ( 4%) 74359kB ( 8%)
ggc
tree PTA : 19.51 ( 3%) 1.44 ( 3%) 22.90 ( 3%) 15806kB ( 2%)
ggc
PRE : 19.09 ( 3%) 6.52 (15%) 27.10 ( 3%) 1960kB ( 0%)
ggc
TOTAL : 576.55 42.42 794.94 957564 kB
Attached is a tarball that contains pre-compiled source code, and the timing
statistics for both 4.0.2 and 4.1.0 as generated by GCC.
This problem may have already been reported by or related to the following
bugs:
bug 18419, bug 17895, bug 17596.
Another thing to note. The object file for 4.1.0 is 21% larger than for 4.0.2
(1454880 vs 1759292).
Platform: (Linux FC3 with updates):
Linux 2.6.12-1.1381_FC3smp #1 SMP Fri Oct 21 04:03:26 EDT 2005 i686 i686 i386
GNU/Linux
gcc -v: (slow)
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.0/configure --prefix=/proj/install
--enable-languages=c,c++,java --with-gnuas --with-gnuld
Thread model: posix
gcc version 4.1.0
gcc -v: (fast)
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../svn/configure --prefix=/proj/install2
--enable-languages=c,c++ --with-gnuld --with-gnuas
Thread model: posix
gcc version 4.0.2
--
Summary: Compiling LLVM now takes nearly 5x as long with 4.1 as
it did with 4.0
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rspencer at x10sys dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
@ 2006-04-13 7:48 ` rspencer at x10sys dot com
2006-04-13 16:30 ` [Bug tree-optimization/27140] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-13 7:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rspencer at x10sys dot com 2006-04-13 07:48 -------
Created an attachment (id=11253)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11253&action=view)
source code and -ftime-report output for both 4.0.2 and 4.1.0
This tarball contains 2MB of pre-compiled source code (slow.cpp) as well as two
output files (slow.out=4.1.0 and fast.out=4.0.2). These contain the command
lines used, the "gcc -v" output and the "gcc -ftime-report" output.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
2006-04-13 7:48 ` [Bug c++/27140] " rspencer at x10sys dot com
@ 2006-04-13 16:30 ` pinskia at gcc dot gnu dot org
2006-04-13 16:31 ` sabre at nondot dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-13 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-13 16:30 -------
I bet it has nothing to do with those but instead PR 26830.
Just a quick question since you might know before I go looking into the source.
Does this source has a big switch and a couple of loops in it?
If it does this almost for sure PR 26830 fixed part of the compile time issue,
at least for 4.1.1.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|c++ |tree-optimization
Keywords| |compile-time-hog
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
2006-04-13 7:48 ` [Bug c++/27140] " rspencer at x10sys dot com
2006-04-13 16:30 ` [Bug tree-optimization/27140] " pinskia at gcc dot gnu dot org
@ 2006-04-13 16:31 ` sabre at nondot dot org
2006-04-13 17:26 ` rspencer at x10sys dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: sabre at nondot dot org @ 2006-04-13 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from sabre at nondot dot org 2006-04-13 16:31 -------
Note: "(albeit 2 million source lines)" isn't right, it's only 79K LOC. :)
-Chris
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (2 preceding siblings ...)
2006-04-13 16:31 ` sabre at nondot dot org
@ 2006-04-13 17:26 ` rspencer at x10sys dot com
2006-04-13 20:14 ` rspencer at x10sys dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-13 17:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rspencer at x10sys dot com 2006-04-13 17:26 -------
Re: 2 million lines:
Yes, my apologies for the late night blunder. It is 2,231,753 bytes and 79,037
lines.
Re: large switch statements:
There are several switch statements, none of them large. The largest is about
200 lines of code. None have more than 100 cases. The 200 line one only a few
cases with some complex if/else code in each case. You'll have to look at the
source yourself to get a better idea of "complex"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (3 preceding siblings ...)
2006-04-13 17:26 ` rspencer at x10sys dot com
@ 2006-04-13 20:14 ` rspencer at x10sys dot com
2006-04-13 20:30 ` rspencer at x10sys dot com
` (8 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-13 20:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rspencer at x10sys dot com 2006-04-13 20:13 -------
Created an attachment (id=11260)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11260&action=view)
Timing results when using GCC 4.1.1
This attachment provides the -ftime-report output for the same compilation but
with GCC 4.1.1 (prerelease). This takes about 1/2 the time as 4.1.0 but is
still twice the time of 4.0.2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (4 preceding siblings ...)
2006-04-13 20:14 ` rspencer at x10sys dot com
@ 2006-04-13 20:30 ` rspencer at x10sys dot com
2006-04-13 22:40 ` Daniel Berlin
2006-04-13 22:40 ` dberlin at dberlin dot org
` (7 subsequent siblings)
13 siblings, 1 reply; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-13 20:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rspencer at x10sys dot com 2006-04-13 20:30 -------
Created an attachment (id=11261)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11261&action=view)
Timing results with -fno-tree-salias
Andrew Pinskia suggested that I try -fno-tree-salias. This decreased
compilation time by about 10% (244 secs vs 265 secs).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (5 preceding siblings ...)
2006-04-13 20:30 ` rspencer at x10sys dot com
@ 2006-04-13 22:40 ` dberlin at dberlin dot org
2006-04-17 10:16 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: dberlin at dberlin dot org @ 2006-04-13 22:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dberlin at gcc dot gnu dot org 2006-04-13 22:40 -------
Subject: Re: Compiling LLVM now takes nearly 5x as long with 4.1 as it did
with 4.0
On Apr 13, 2006, at 1:30 PM, rspencer at x10sys dot com wrote:
>
>
> ------- Comment #6 from rspencer at x10sys dot com 2006-04-13
> 20:30 -------
> Created an attachment (id=11261)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11261&action=view)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11261&action=view)
> Timing results with -fno-tree-salias
>
> Andrew Pinskia suggested that I try -fno-tree-salias. This decreased
> compilation time by about 10% (244 secs vs 265 secs).
Only by virtue of the fact that you have a smaller number of phi nodes.
It's not going to give an order of magnitude improvement here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 20:30 ` rspencer at x10sys dot com
@ 2006-04-13 22:40 ` Daniel Berlin
0 siblings, 0 replies; 17+ messages in thread
From: Daniel Berlin @ 2006-04-13 22:40 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
On Apr 13, 2006, at 1:30 PM, rspencer at x10sys dot com wrote:
>
>
> ------- Comment #6 from rspencer at x10sys dot com 2006-04-13
> 20:30 -------
> Created an attachment (id=11261)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11261&action=view)
> Timing results with -fno-tree-salias
>
> Andrew Pinskia suggested that I try -fno-tree-salias. This decreased
> compilation time by about 10% (244 secs vs 265 secs).
Only by virtue of the fact that you have a smaller number of phi nodes.
It's not going to give an order of magnitude improvement here.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (6 preceding siblings ...)
2006-04-13 22:40 ` dberlin at dberlin dot org
@ 2006-04-17 10:16 ` rguenth at gcc dot gnu dot org
2006-04-21 23:12 ` rspencer at x10sys dot com
` (5 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-17 10:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2006-04-17 10:16 -------
This may be fixed by Zdeneks optimization of phi argument rewrite and dominator
updating. Though I bet these are not appropriate for 4.1.1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (7 preceding siblings ...)
2006-04-17 10:16 ` rguenth at gcc dot gnu dot org
@ 2006-04-21 23:12 ` rspencer at x10sys dot com
2006-10-17 22:42 ` rspencer at x10sys dot com
` (4 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-04-21 23:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rspencer at x10sys dot com 2006-04-21 23:12 -------
Andrew Pinskia wanted me to mention that there are other source files in LLVM
that exhibit the slow down. The one I attached is the worst offender, but there
are others. Unfortunately, I don't remember which files and I removed GCC 4.1
from my system so I can't easily find out. If you build LLVM with GCC 4.1,
you'll quickly discover which files are the slow ones.
--
rspencer at x10sys dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rspencer at x10sys dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (8 preceding siblings ...)
2006-04-21 23:12 ` rspencer at x10sys dot com
@ 2006-10-17 22:42 ` rspencer at x10sys dot com
2006-10-17 22:44 ` Andrew Pinski
2006-10-17 22:44 ` pinskia at physics dot uc dot edu
` (3 subsequent siblings)
13 siblings, 1 reply; 17+ messages in thread
From: rspencer at x10sys dot com @ 2006-10-17 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rspencer at x10sys dot com 2006-10-17 22:42 -------
This is still a problem with:
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Additionally, link times are much longer than with 3.4.6
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-10-17 22:42 ` rspencer at x10sys dot com
@ 2006-10-17 22:44 ` Andrew Pinski
0 siblings, 0 replies; 17+ messages in thread
From: Andrew Pinski @ 2006-10-17 22:44 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
> Additionally, link times are much longer than with 3.4.6
Link times are usually a binutils issue unless you are comparing
with the same version of binutils.
-- Pinski
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (9 preceding siblings ...)
2006-10-17 22:42 ` rspencer at x10sys dot com
@ 2006-10-17 22:44 ` pinskia at physics dot uc dot edu
2008-01-26 23:00 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 17+ messages in thread
From: pinskia at physics dot uc dot edu @ 2006-10-17 22:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at physics dot uc dot edu 2006-10-17 22:44 -------
Subject: Re: Compiling LLVM now takes nearly 5x as long with 4.1 as it did
with 4.0
> Additionally, link times are much longer than with 3.4.6
Link times are usually a binutils issue unless you are comparing
with the same version of binutils.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (10 preceding siblings ...)
2006-10-17 22:44 ` pinskia at physics dot uc dot edu
@ 2008-01-26 23:00 ` rguenth at gcc dot gnu dot org
2008-09-03 2:13 ` pinskia at gcc dot gnu dot org
2009-08-14 16:27 ` jessieluv22 at gmail dot com
13 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-26 23:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2008-01-26 22:57 -------
How is the situation with 4.2 or 4.3?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (11 preceding siblings ...)
2008-01-26 23:00 ` rguenth at gcc dot gnu dot org
@ 2008-09-03 2:13 ` pinskia at gcc dot gnu dot org
2009-08-14 16:27 ` jessieluv22 at gmail dot com
13 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-03 2:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2008-09-03 02:12 -------
2008-05-08 Richard Guenther <rguenther@suse.de>
Remove struct aliasing which fixed some compile time, there were other patches
too like mem-ssa.
But it would be nice if we could get new compile time numbers here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/27140] Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
` (12 preceding siblings ...)
2008-09-03 2:13 ` pinskia at gcc dot gnu dot org
@ 2009-08-14 16:27 ` jessieluv22 at gmail dot com
13 siblings, 0 replies; 17+ messages in thread
From: jessieluv22 at gmail dot com @ 2009-08-14 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jessieluv22 at gmail dot com 2009-08-14 16:27 -------
Created an attachment (id=18364)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18364&action=view)
Witha butterfil on a flower
It is a beautiful fly with colorful wings
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27140
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-08-14 16:27 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-13 7:44 [Bug c++/27140] New: Compiling LLVM now takes nearly 5x as long with 4.1 as it did with 4.0 rspencer at x10sys dot com
2006-04-13 7:48 ` [Bug c++/27140] " rspencer at x10sys dot com
2006-04-13 16:30 ` [Bug tree-optimization/27140] " pinskia at gcc dot gnu dot org
2006-04-13 16:31 ` sabre at nondot dot org
2006-04-13 17:26 ` rspencer at x10sys dot com
2006-04-13 20:14 ` rspencer at x10sys dot com
2006-04-13 20:30 ` rspencer at x10sys dot com
2006-04-13 22:40 ` Daniel Berlin
2006-04-13 22:40 ` dberlin at dberlin dot org
2006-04-17 10:16 ` rguenth at gcc dot gnu dot org
2006-04-21 23:12 ` rspencer at x10sys dot com
2006-10-17 22:42 ` rspencer at x10sys dot com
2006-10-17 22:44 ` Andrew Pinski
2006-10-17 22:44 ` pinskia at physics dot uc dot edu
2008-01-26 23:00 ` rguenth at gcc dot gnu dot org
2008-09-03 2:13 ` pinskia at gcc dot gnu dot org
2009-08-14 16:27 ` jessieluv22 at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).