From 03afe7b9f836a37858b2c9de24c26881e4662589 Mon Sep 17 00:00:00 2001 From: Sun Jiao Date: Fri, 5 Jan 2024 19:50:33 +0800 Subject: [PATCH] reduce bytes length for memory saving, closes #16 --- lib/src/xid_base.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/xid_base.dart b/lib/src/xid_base.dart index e7f427d..ee5990f 100644 --- a/lib/src/xid_base.dart +++ b/lib/src/xid_base.dart @@ -98,7 +98,7 @@ class Xid { var counter = _counter(); var machineID = _getMachineId(); - _xidBytes = List.filled(20, 0, growable: false); + _xidBytes = List.filled(12, 0, growable: false); _xidBytes![0] = (now >> 24) & 0xff; _xidBytes![1] = (now >> 16) & 0xff;