For those of you working with larger and more complex 4D View Pro files, we understand the performance concerns that arise. To tackle this, we have introduced a new file format called .sjs. The .sjs format is a compressed file with multiple smaller JSON files, following a structure similar to Excel XML. This new format aims to enhance performance and optimize the handling of these files.
Import/export sjs file
This new format can be imported and exported, with the VP IMPORT DOCUMENT and VP EXPORT DOCUMENT commands:
// Import of a sjs document
VP IMPORT DOCUMENT("ViewProArea"; "c:\\example\\mySJSfile.sjs"; {formula: Formula(SJSExport)})
...
// Export of a sjs document
VP EXPORT DOCUMENT("ViewProArea"; "c:\\example\\mySJSfile.sjs"; {formula: Formula(SJSExport)})
Like xslx or csv formats, note that this document loading and saving is asynchronous. You need to use the formula attribute to start an action at the end of the document processing.
You can use the open and save buttons in the ribbon to use this new file format:
Performance Enhancement
Internally this change results in faster performance and smaller file size.
Here are some performance numbers that compare the import and export of files with 1 million values with default options:
4vp file | sjs file | |
Import file | 6 s | 1 s |
Export file |
5 s | 2 s |
File size | 26 Mb | 3 Mb |
Explore these features in greater detail by referring to the documentation!