[Gambas-user] Can JSON.Decode be faster?

Benoît Minisini g4mba5 at gmail.com
Thu Jan 18 02:05:11 CET 2018


Le 18/01/2018 à 01:05, Benoît Minisini a écrit :
> Le 17/01/2018 à 21:27, Patrik Karlsson a écrit :
>> In this little project: https://github.com/trixon/gambas-idg (contains 
>> a json file, requires Gambas=3.10.90 c1e4b89 (master))
>>
>> I'm decoding a json string around 1MB and it takes 30 seconds in Gambas.
>> CPU:       Quad core Intel Core i7-6700HQ (-MT-MCP-) cache: 6144 KB
>>             clock speeds: max: 3500 MHz 1: 800 MHz 2: 800 MHz 3: 800 
>> MHz 4: 800 MHz 5: 800 MHz 6: 800 MHz
>>             7: 800 MHz 8: 800 MHz
>>
>> When doing it in java with Google Gson it takes virtually no time at all.
>>
>> I intend to use this in an image viewer that consumes base64 encoded 
>> photos wrapped in a json among its exif data.
>> Could this be done faster in Gambas?
> 

You can test the commit 
https://gitlab.com/gambas/gambas/commit/4ff9f7ddef726e3957c30bf31b794b894b88d914 
to check the speed up of the JSON.Decode() routine.

...and the default null margin for ImageView.ZoomFit() too.

Regards,

-- 
Benoît Minisini


More information about the User mailing list