Commit Graph

5 Commits

Author SHA1 Message Date
Campbell Barton
aa4f717b41 Docs: add missing \file blocks to blenlib & blenkernel 2025-03-29 15:18:50 +11:00
Campbell Barton
3271b37189 Unbreak build from missing include on some configurations
For some reason this was needed on one of my systems
even with TBB enabled.
2025-02-26 09:01:36 +11:00
Jacques Lucke
dcd5e54f58 BLI: ignore empty lines when parsing CSV files 2025-02-24 11:26:43 +01:00
Jacques Lucke
3263dd6333 Fix: Geometry Nodes: unescape column names after csv import 2025-02-19 12:36:19 +01:00
Jacques Lucke
ac2cd6c1ef Geometry Nodes: make CSV parser more reliable and faster
This reimplements the CSV parser used by the (still experimental) Import CSV
node.

Reliability is improved by:
* Properly handling quoted fields.
* Unit tests.
* Generalizing the parser to be able to handle customized delimiter, quote and
  escape characters (those are not exposed in the node yet though).
* More accurate detection of column types by actually taking all values of a
  column into account instead of only the first row.

Performance is improved by designing the parser in a way that supports
multi-threaded parsing. I'm measuring about 5x performance improvement which
mainly comes from multi-threading. Some files I wanted to use for benchmarking
didn't load in the version that's in `main` but do load fine with this new
version.

The implementation is now split up into two parts:
1. A general CSV parser in `blenlib` that manages splitting a buffer into
   records and their fields.
2. Application specific parsing of fields into e.g. floats and integers which
   remains in `io/csv/importer`.

This separation simplifies unit testing and makes the core code more reusable.

Pull Request: https://projects.blender.org/blender/blender/pulls/134715
2025-02-19 11:10:59 +01:00