just TODO comment: performance optimization v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 11 Apr 2021 17:27:12 +0200
branchv_0
changeset 52 785fc49b0a55
parent 51 7e851aa01499
child 53 653e3b154191
just TODO comment: performance optimization
src/StreamRelationalWriter.h
--- a/src/StreamRelationalWriter.h	Sat Oct 24 00:08:18 2020 +0200
+++ b/src/StreamRelationalWriter.h	Sun Apr 11 17:27:12 2021 +0200
@@ -116,12 +116,14 @@
 
 	void writeAttribute(const string_t& value) override {
 		if (currentColumn == 0) integerWriter.writeValue(output, DATA_PART_ROW);
+		// TODO: select writer for each attribute just once in startRelation() instead of looking it each time here
 		writeString(value, columnTypes[currentColumn]);
 		if (++currentColumn == columnCount) currentColumn = 0;
 	}
 
 	void writeAttribute(const void* value, const std::type_info& type) override {
 		if (currentColumn == 0) integerWriter.writeValue(output, DATA_PART_ROW);
+		// TODO: select writer for each attribute just once in startRelation() instead of looking it each time here
 		writeRaw(value, type, columnTypes[currentColumn]);
 		if (++currentColumn == columnCount) currentColumn = 0;
 	}