| Discussion |
Keywords: Saver, Enhancement, Suggestion
Remote Name: 220.127.116.11
The typical BTCrit configuration probably uses only a small fraction of the large number of available criteria, so you should be able to speed up both state-saving and restoration by skipping over criteria that are already at their default settings, as you suggest. In order to make this approach work, you would need to adjust the state-saving logic to cause the first restoration step to be putting the whole form into its default state, which would presumably be a new method of the form. State-saving logic for individual criteria would then be turned into no-ops for cases where they are in their default state, so you avoid both the cost of generating a meta-file record and the cost of executing it upon state restoration. This also would make saved configurations more compact. As a further optimization, the method for defaulting the whole form could also check for the special case of criteria being already in their default state, but this is probably a much more minor optimization.
In addition to the above, which only helps if most aspects of the configuration tend to be left in their default state, keep in mind the following potential optimizations:
I'm currently working on a new version of the Saver facilities that will reduce the size and complexity of state-restoration commands somewhat, but I don't expect this to have a major impact on performance. The primary motivation for the upcoming Saver changes is to support better error handling, as well as a generally cleaner design. As you mentioned, it will be necessary to update your saved configurations after making the changes you are contemplating. Making it easier to to automatically convert old configuratons easier is another issue I'd like to tackle in the new version of the Saver facility.