Opened 22 months ago

Last modified 7 months ago

#5732 new change

[emscripten] Stop using i64 arithmetic

Reported by: trev Assignee: rjeschke
Priority: P3 Milestone:
Module: Core Keywords:
Cc: oleksandr Blocked By:
Blocking: #4122 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



i64 arithmetic is very inefficient with Emscripten. However, we are currently using it when parsing or serializing timestamps.

What to change

Store timestamps as i32 numbers internally (seconds rather than milliseconds). For compatibility with the existing storage format, add three trailing zeros to timestamps when serializing. Also, ignore the last three digits when parsing timestamps. Use a new type for timestamps, so that the generated bindings code can automatically add * 1000 for the property getters and / 1000 for property setters.

Change History (3)

comment:1 Changed 22 months ago by oleksandr

  • Cc oleksandr added

comment:2 Changed 21 months ago by rjeschke

  • Owner set to rjeschke

comment:3 Changed 7 months ago by hfiguiere

This is not a problem if we move to WebAssembly.

See issue #6312

Note: See TracTickets for help on using tickets.