Path for temporary files when compiling via command line

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
Stefan Malz
Posts: 13
Joined: Tue Nov 28, 2006 5:18 pm

Path for temporary files when compiling via command line

Unread post by Stefan Malz »

Hello,

we would very much appreciate if H&M has the option to state an explicit, separate path for temporary files ("~tmpchm" directory) when compiling project via the command line. This would enable us to let those temporary files be written to a RamDrive.

All our other tools (C++ compiler, 7z, setup composer, etc.) already have this option and it speeds up things considerably even compared to our fast SSD drives.

Compiling all the CHM files of pour project (a total of about 70 files) currently takes more than 13 minutes, 10 minutes of which are spent on writing the temporary files alone.

Furthermore, frequent writing and deleting of huge files on a SSD wears out the SSD in the end.

Best regards
Stefan
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Path for temporary files when compiling via command line

Unread post by Tim Green »

Hi Stefan,

Our developers will look into this possibility. Whether a RAM drive really brings a significant improvement would depend on how many small topics you have. If you have a lot of small topics the improvement might be smaller than you expect, because random writes of multiple small files on SSDs is a lot slower than their nominal sequential write speed. If your projects are large enough to take that much time to publish on a fast SSD you will also need a large RAM drive, of course...
Furthermore, frequent writing and deleting of huge files on a SSD wears out the SSD in the end.
That is only true in theory. In practice, extensive tests have shown that modern SSDs with wear leveling and properly configured over-provisioning are much more reliable and last much longer than spinning disks, no matter how hard you are using them.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Path for temporary files when compiling via command line

Unread post by Alexander Halser »

Hi Stefan,

We might implement this option in a future update. However, we cannot confirm that a RAM drive will speed up publishing CHM files. I tested the differences myself with SoftPerfect RAM Drive with H&M's own online help.

1) Regular export, temp files in the project folder, all on SSD. Time until export completes and CHM compiler starts: 43 seconds

2) CHM export, temp files stored on a RAM drive, which is pyhsically on SSD. Time until export completes: 43 seconds

3) Regular CHM export, temp files in the project folder, but the temp files were left in place from a compilation before: 23 seconds

The biggest impact on the compilation time has not the RAM drive, but the option to keep the temporary files. H&M saves this option with the projec, so when you manually export once, the option will be re-used for command line publishing tasks as well. The reason why this impact is so huge is not the HTML files that have to be written to disk, which are re-created every time. What makes the difference are the images, which are compared if source and target differ and are only copied if the file hash differs. That's particularly important for "native" image formats, such as GIF, PNG and JPEG. If the image in the temp folder doesn't have to be updated, nothing's copied at all. The comparison with file hashes is super-fast.
Alexander Halser
Senior Software Architect, EC Software GmbH
Post Reply