Question: how to speed up development with larger code base?

I have about 30 modules under one root common module.  The total code is about 25,000 lines.

Currently during development, when I change a line of code and want to run a test, I just do

interface(warnlevel=4);
kernelopts('assertlevel'=2):
read   "my_root_module.mpl";
#run some test 

From a worksheet. This works fine, but it is very slow. it takes now about 8-10 minutes to finish each time.

So each time I make small change to the source code, which all sit in separate .mpl plain text files, I have to wait and wait for the read to complete.

This is way too slow. 

The thing is, my my_root_module.mpl files includes child modules (using the $include directive), and each child module might also have $include to pull in its own child modules, if any. Each module is onbe separate .mpl file.

So at the end my_root_module.mpl will end up reading all the code, which is now about 25,000 lines over 30 or so modules. Here is an example of the layout I have

my_root_module.mpl
=======
export my_root_module:=module()
$include  "B.mpl"   
$include  "C.mpl"                            
$include  "D.mpl"   
   export foo:-proc()....     B:-foo().... end proc;
end module:

B.mpl
=======
local B:=module()
$include  "B1.mpl"   
$include  "B2.mpl"                            

   export foo:=proc()..... end proc;
end module:

C.mpl
=======
local C:=module()
$include  "C1.mpl"   

   export foo:=proc()..... end proc;
end module:

etc...

There must be faster way to do this. Having to wait about 10 minutes each time to test one small code change each time is not practical.

What do others do when they develope large code in Maple? Is this a typical time?

I do not want to break my main modules into separate name spaces again in order to  use separate mla for each module, so that my changes only affects one mla file.  This will speed things, as I would then only have to rebuild one small modules, the one I changed.

But I want to put all my modules under one common module, which acts just as a common name space, and have only one mla file.

Are there ways to speed  reading mpl file?

Edit

Thanks to all the answers. It turned out indeed to be the slow Maple GUI again. The option interface(prettyprint= 0) did not help in the worksheet to speed the GUI.

I wrote the commands to read the mpl file and build the mla in a file, and used the DOS command line, and turned off the warning messages using DOS option, and now it finished almost instantly.

"C:\Program Files\Maple 2021\bin.X86_64_WINDOWS\cmaple.exe" UPDATE_MLA.mpl 1> nul

    memory used=18.6MB, alloc=73.3MB, time=0.52

Notice, in the above 1>nul will not even display the warning messages on the terminal. 2>nul does not work, since these are not error messages. Here are the different redirection options from the net

 

But even without using this redirection, and keeping the messages scroll on the terminal, it was still very very fast from the command line

I complained about how slow the Maple Java GUI when it comes to scrolling and how it can can cause  slow down many times before, so will not complain again about. May be one day Maplesoft will fix this.

Please Wait...