Can you take a look at this issue? I am not sure if you can reproduce this issue. If you can’t, what can I for you to help you reproduce this performance regressions?
SketchUp 2021 brings to light a significant under-the-hood improvement: a re-build of the .SKP file format. You are likely to notice a significant reduction in file sizes when saving models to the new format, and we’re excited about additional workflow improvements this new file format will unlock going forward.
So … if your test is now saving in the new compressed archival version 21 format, then it is expected that the save process will take some amount more time than the older pre-21 non-compressed binary format.
I don’t know what the average is. 15% doesn’t sound like too much (to me.)
EDIT: Actually with your reported times, it appears to take 30% more time.
@DanRathbun I just realized API issue should be reported in API Issue Tracker. I thought it was Sketchup SDK issue and then reported here (it is wrong place). Next time I will strictly follow up the rules.
Thanks for your information. Updating the toolkits was another person. So I missed the important release information about saving in the new compressed archival version 21 format. But I quite noticed the file size is reduced.
The generated sketchup file size is close to 220M. Is it possible that the bigger the file size of the generated skp file, more save time being taken?
for an older pre-21 version, do you mean the version like " SUModelVersion_SU2017, SUModelVersion_SU2018, SUModelVersion_SU2019, SUModelVersion_SU2020" etc.
I tried to call the API SUModelSaveToFileWithVersion with version “SUModelVersion_SU2020”, the time is not reduced.
Open the test file in SketchUp 2020, and if it opens you can open the Model Info dialog, then switch to the “File” panel and see the version displayed.
If it does not open a messagebox should appear saying that the file version is newer than the application version.
(Note that because they are attempting to make the new SKP format more portable between versions, they have removed the Version display field from the Model Info > File panel in 21.0.)
Via APIs:
We have issues logged for this (but not yet implemented):
There are Ruby snippets that can get this from an external file in this old issue …
This slowdown is most likely due to model validity checks which we have to run when saving in the new file format. Prior to 2021, the C API did not do that consistently, which resulted in faster saves. But it could result in models with validity errors. Our benchmarks show that the saving itself is not perceptibly slower with the new format.
Rest assured that we are looking into speeding up the validity checks.
According to the discussion above, now it seems there are two possible causes which introduce the extra time cost.
File compress in new version
According to the test result, switch to prior to 2021, the time is not reduced. So the performance regression seems not be caused by it
Model validity check
For the model validity check, is it possible to provide an option to let clients decide if require the model validity check during saving in the new file format? If the version is set to prior to 2021, is the model validity check skipped? I tried to save as version 2020, it seems the time is not reduced.
Based on the new version toolkit, what can I do to keep the saving time as before?
They say that “saving” time is still “about the same” as before. But I myself think the new format must add some time over and above the old binary format. I asked Bugra to come and give his opinion because he knows more than I about this subject.
Not entirely. The validity checking has been increased over the past few major versions.
No there is no such option. The increase in save time will ensure more stable model files.
Back saving too many versions will remove newer features such as tag (layer) folder support.
Validity checking is not dependent on the model format version and it is currently not optional. I am a bit surprised this is such a showstopper for you since we have not heard any other complaints. Can you share an example model you are looking at?