Posted by: rowbearto
« on: December 18, 2017, 06:50:52 PM »After using this great macro for many years, I have made an optimization that makes it much much faster. This optimization will minimize the number of calls to the "insert_file_list()" macro by including all the wildcards and excludes in one call per dir line to insert_file_list().
I have posted the latest version with this modification to github:
https://github.com/rbresalier/sync_project_with_scm
This macro still has a big advantage over SlickEdit's native support of wildcard adding of files to a project. With SE's wildcard adding, every time you open your project it needs to perform a scan to find all the files. But with this macro this scan can be done on demand by running the 'ssync' macro. When running 'ssync', it saves the list of files to the .vpj file so that this list can be reused when you close the project and open it again later. SE's wild card adding only saves the wild card patterns to the .vpj file, so every time you open your project, it has to rescan. This rescanning can take a long time if you have 10000s of files in a networked drive. The 'ssync' macro only performs this scanning when the user runs 'ssync', and the scanning is now optimized in this latest version of 'ssync' to make the scan much faster.
I have posted the latest version with this modification to github:
https://github.com/rbresalier/sync_project_with_scm
This macro still has a big advantage over SlickEdit's native support of wildcard adding of files to a project. With SE's wildcard adding, every time you open your project it needs to perform a scan to find all the files. But with this macro this scan can be done on demand by running the 'ssync' macro. When running 'ssync', it saves the list of files to the .vpj file so that this list can be reused when you close the project and open it again later. SE's wild card adding only saves the wild card patterns to the .vpj file, so every time you open your project, it has to rescan. This rescanning can take a long time if you have 10000s of files in a networked drive. The 'ssync' macro only performs this scanning when the user runs 'ssync', and the scanning is now optimized in this latest version of 'ssync' to make the scan much faster.