Amerio.Stephane Posted December 22, 2022 Share Posted December 22, 2022 Hello, we need a safe way to ignore some mount points at the startup of our application. Use case: we have a lot of different terrains and heavy geometry, each separated in its own mount point (eg. one for a French terrain, another for a German one, etc.). Due to some specific limitations on our premises, the parsing of the mount files at start-up is time consuming (but this is a whole other topic, not the subject here!), so we resorted to manually rename the mount point before start-up, so the app would simply not found some mount folders and hence would load faster (eg. if we only need the terrain FR, we would keep its .umount but rename all others so they are not found). This was an easy "quick and dirty" fix, but it falls apart if we need to have two apps (or apps and editor) running side by side with different terrain for example. So, digging in the doc, I found there is a FileSystem::removeMount which would be perfect, if only there was a way to call it at the right time (ie BEFORE the filesystem had actually wasted long minutes parsing a umount I'm about to unmount...) In fact, the best way would have been to tell the filesystem to simply ignore any umount with some names, without of course modifying the files on disk. Any way to achieve this? Link to comment
silent Posted December 23, 2022 Share Posted December 23, 2022 Hi Stephane, You can't do any FileSystem manipulations if its' not initialized, but when it has been already initialized you have all the files loaded. We can probably think of adding a separate callback when FS is initialized, but no files being actually loaded and you can do some dirty hacks here, but that's would be really unsafe thing to do :) How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Amerio.Stephane Posted January 3, 2023 Author Share Posted January 3, 2023 Hi and happy new year to all Unigine team :) Instead of preventing the mounting of a umount, would it be possible instead to mount a new umount at runtime? The idea here would be by default to only have the "ig" umount, and then at runtime to selectively load the ones we need. How could I do that? Could it serve my intended purpose (ie selectively enabling to filesystem one or more folders to have a faster load time) Thanks! Link to comment
silent Posted January 9, 2023 Share Posted January 9, 2023 As far as I know there is only one way to create mounts in runtime - by using the createMount() method. So you can only left a single mount in the directory (.umount file) and than load others when you need them. But you need to be sure that your application logic will not try to load missing files and your content databases are actually are not referring any mounts-related content. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Amerio.Stephane Posted January 9, 2023 Author Share Posted January 9, 2023 Ok, understood. So this is not a solution for our usecase. I guess we will have to wait, maybe in a future version, for a way to prevent some umount mounting on the startup command line (if that makes sense). Thanks! Link to comment
chris.dyer Posted October 3, 2023 Share Posted October 3, 2023 I believe we are going to have a similar situation in our application where we would like to dynamically load/unload mount points as we go. So its a bit unfortunate if we are forced to load all content at start and then remove them all so we can add only one later. If you can dynamically add/remove an existing mount point (i.e. without using createMount) then it would seem sensible to be able to control the initial state of this (maybe via an additional flag to "automatically add on initialise" in the mount file itself). This is my +1 vote to hope to see this get added :) Link to comment
silent Posted October 3, 2023 Share Posted October 3, 2023 Yeah, we have this feature in our TODO list (but with a minor priority atm). In case of any change I will surely let you know :) How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts