From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31453 invoked by alias); 10 Apr 2011 17:47:57 -0000 Received: (qmail 31444 invoked by uid 22791); 10 Apr 2011 17:47:57 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_JV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Apr 2011 17:47:53 +0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/25708] Module loading is not good at all X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: AssignedTo Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 10 Apr 2011 17:47:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01028.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25708 Jerry DeLisle changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|pault at gcc dot gnu.org |jvdelisle at gcc dot | |gnu.org --- Comment #16 from Jerry DeLisle 2011-04-10 17:47:07 UTC --- Paul, taking this one if you do not mind. I have run some tests. I replaced the long strings in the various minit invocations with a 2 or 3 character mnemonic. For a particularly large module the size of the .mod file created is: un-patched -> 8210691 bytes gzipped -> 724854 bytes patched -> 6280606 bytes patched and zipped -> 714777 bytes Compressing the file is quite good. There is no particular advantage to changing the minit strings if one is going to compress the file. The question is then what cost in time do we have of actually compressing and decompressing. The above just deals with raw file size and I think compression is a good idea. If we leave the strings alone, we could allow manual decompressing the files to look at them for debugging purposes. The next thing I would like to consider is some sort of module caching. Let's say we create a module namespace for each module file. I would suggest allowing a fixed number of these to conserve memory usage. Modules that are USEed repeatedly would be retained, free up ones not used if more are needed. I am thinking of some sort of leased recently used scheme. Another thing I wonder about is how efficiently do we retrieve from this name space. (I have more to study on the internals of module.c)