Removed old comment and move an array a bit later in function

This commit is contained in:
2025-02-12 14:54:10 +01:00
parent 84f5749aa2
commit 7352ec45c7
6 changed files with 8 additions and 13 deletions
+3 -3
View File
@@ -190,9 +190,6 @@ pub fn parseEntities(
var safe_allocator = std.heap.ThreadSafeAllocator{ .child_allocator = arena.allocator() };
const allocator = safe_allocator.allocator();
var buff = std.ArrayList(u8).init(entry_allocator);
const writer = buff.writer();
const sstruct = try self.schema_engine.structName2SchemaStruct(struct_name);
const to_parse = try self.allFileIndex(allocator, struct_name);
@@ -235,6 +232,9 @@ pub fn parseEntities(
wg.wait();
// Append all writer to each other
var buff = std.ArrayList(u8).init(entry_allocator);
const writer = buff.writer();
writer.writeByte('[') catch return ZipponError.WriteError;
for (thread_writer_list) |list| writer.writeAll(list.items) catch return ZipponError.WriteError;
writer.writeByte(']') catch return ZipponError.WriteError;
+1 -1
View File
@@ -268,7 +268,7 @@ pub fn deleteEntities(
writer.writeByte(']') catch return ZipponError.WriteError;
// FIXME: Stop doing that and just remove UUID from the map itself instead of reparsing everything at the end
// It's just that I can't do it in deleteEntitiesOneFile itself
// It's just that I can't do it in deleteEntitiesOneFile itself because of multi thread that update the map at same time
sstruct.uuid_file_index.map.clearRetainingCapacity();
_ = sstruct.uuid_file_index.reset();
try self.populateFileIndexUUIDMap(sstruct, sstruct.uuid_file_index);