Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qb64 and ramdisk compilation
#1
hello, my computer under linux has a lot of memory. to speed it up as much as possible i have configured half of the memory in ramdisk. i have examined the source code of qb64, it would be nice to have an option at compile time to create temp directories in the ramdisk. i think it could speed up the compilation of the programs by a factor 10 or more...
Reply
#2
apparently. when compiling qb64 creates many temp directories and many disk accesses that certainly slow down the processing. a ramdisk can remedy this and these temporary data disappear at each system shutdown ...

the modification could be done as follows:

- add an option in the menu of the editor of qb64 to specify a directory where to create the temporary files.

- add a command line option or in case the qb64 editor is not used.

- if the directory does not exist. create it automatically.

another advantage is to preserve the health of ssd disks that don't support too frequent disk writes.

this is just a suggestion...
Reply
#3
Aren't you over complicating things a bit?

As far as I know, all you'd need to do is copy your QB64 folder completely over your ramdrive, and then just run the QB64.exe from there. (Or download the proper package for your OS and then extract and set it up there.)

QB64 has been usable by command line for ages, and you can specify both the path for the infile and the outfile with it.
Reply
#4
I think it's a very good suggestion and something I'd like to see fixed for the Linux version - We should probably replace `./internal/temp` with respecting the TMPDIR environment variable and fallback to `/tmp` itself, potentially with a command line option to manually specify the location. Unfortunately I think there are a decent number of barriers to this though:

1. The ./internal/temp location is in more than a few different locations in the source, so those would need to be rounded up and addressed.
2. Some files outside of `./internal/temp` are modified during compilation, in particular qbx.cpp. qbx.cpp also has direct statements that include files from `./internal/temp`, so really a full solution for dealing with this file is needed. There might also be one or two other stray files modified during compilation that also need addressed.
3. Many object files for libqb are compiled outside of `./internal/temp`. These don't change as much as the stuff in `./internal/temp`, but they might be annoying. If we offer a 'proper' Linux install those files could potentially be shipped precompiled so we can probably ignore them for the moment.

I would definitely encourage you to submit an issue to the Github here, that would be the best way to ensure this idea doesn't get lost.

Also, as a workaround you might be able to turn the `./internal/temp` directory into a symlink to a location on your ramdisk. Not an ideal solution, but I think it would get you most of the way there without needing to wait for changes to QB64.
Reply
#5
** Aren't you over complicating things a bit?

i reexamined the source code of qb64. if the path of internal and temp had been coded in global variables at the beginning of the code, the modification would be easy. this is not the case. these references are found everywhere in the code of qb64. you are right SMcNeill. it would be complicated. that said, it would be a plus for qb64 as i have indicated in my other posts...

** As far as I know, all you'd need to do is copy your QB64 folder completely over your ramdrive, and then just run the QB64.exe from there. (Or download the proper package for your OS and then extract and set it up there.)

already done. i found that compilations are much faster. but it is not a practical solution...

** QB64 has been usable by command line for ages, and you can specify both the path for the infile and the outfile with it.

I know. But it has nothing to do with my suggestion.

** Also, as a workaround you might be able to turn the `./internal/temp` directory into a symlink to a location on your ramdisk. Not an ideal solution, but I think it would get you most of the way there without needing to wait for changes to QB64.

yes i have considered this solution DSMan195276. with a bash script. thanks for supporting the idea of managing a ramdisk. i still think it would be a plus for qb64. compiling programs is very slow on a mechanical hard disk. it got better when copying qb64 to ssd...
Reply




Users browsing this thread: 1 Guest(s)