Is it possible to make char-to-float conversion faster? Or what about to support char type in ZGE? Another improvement would be accessing the loaded file as an array - e.g. File would (optionally) take a 1-dimensional array as property and set its "start" to memory with imported file + SizeDim1 to the length of the file on Read FileAction. Is there some restriction for dimensions of arrays?Kjell wrote:Anyway, it does make you wonder how significant the performance penalty of FileMoveData's ( silly ) char to float conversion is in the entire overhead of the call.
Runtime loading of .OBJ meshes
Moderator: Moderators
I took some time to test this right away.
Download the beta again.
See attached project. It currently only works with Arrays of integer type but we could add support for strings to read a text file directly into an array of string. And it only supports reading, but writing could be supported as well. Anyway, please try this and see if speed improves!
Download the beta again.
See attached project. It currently only works with Arrays of integer type but we could add support for strings to read a text file directly into an array of string. And it only supports reading, but writing could be supported as well. Anyway, please try this and see if speed improves!
- Attachments
-
- Temp.zgeproj
- (718 Bytes) Downloaded 972 times
Ville, this is really useful improvement! Attached, you will find a new version of obj loader using array access to the loaded files. Its performance improved in average by 28% on Windows and 31% on relatively slow Android mobile. Original, string-based versions of the obj loader were 40-50% slower.
- Attachments
-
- obj_loader_008.zgeproj
- faster obj loader
- (19.67 KiB) Downloaded 1041 times