Open rts-gordon opened 6 months ago
Ok, I will try it. First investigate where the binary comes from. If you already have stats on it, it will help a lot
Those are my project execute files, two methods for json parsing, Windows 10, CPU Intel Core i7.
method1: json parse, execute file size: 48M
if err := json.Unmarshal(msg, &account); err != nil {
log.Errorf("Unmarshal account failed, tenant: %s, platform: %s, error: %s, message: %s", tenant, platform, err.Error(), msg)
return
}
method 2: sonic parse, execute file size: 97M
if err := sonic.Unmarshal(msg, &account); err != nil {
log.Errorf("Unmarshal account failed, tenant: %s, platform: %s, error: %s, message: %s", tenant, platform, err.Error(), msg)
return
}
Can you try to use older version (<1.10) and give size? If it is still a lot, I doubt that the main cause it doesn't come from C asm files.
@AsterDY There are three execute files size, the Sonic old version (<1.10) is normal, maybe version 1.10 changed something.
ok,It seem native codes need to be embeded on demands. Let me try
Hi there, Any update for this issue?
Also, the compilation time is x2 for v1.10, on 1.9.2 it's two times faster.
Might be useful #561 (comment)
Seem it is due to v1.10 imported iasm as basic assembler (#393), which is used to reslove #489 meanwhile improve C-Go intercall performance. At present, no better solution for this. cc @chenzhuoyu
Hi there, Sonic is a great json library, high performance and very easy to use, thanks for your work.
But the execute file size is double, it is can‘t acceptable in my scenario. Can sonic be optimized when compile? for example: only compile source code for CPU/OS arch currently in use, maybe this will reduce execute file size.
Thank you.