diff options
author | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2024-02-27 10:57:55 +0400 |
---|---|---|
committer | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2024-03-03 20:17:29 +0400 |
commit | 59b1b643113bd8971162a89371a6548cce429c3f (patch) | |
tree | dc5c6c4581909a3a9f43203dcafe0a768e483c4a | |
parent | aa7a77884b5cbc6720fcbbf178e5b5901abe24ea (diff) |
Use a simpler separator for OBJ format lines
Using a regexp for each line in a multimillion-line file leads to a
serious slowdown. And the '\s' regexp is an overkill anyway.
-rw-r--r-- | src/core/StelOBJ.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/StelOBJ.cpp b/src/core/StelOBJ.cpp index 72ea361b8a..5fc789d0fa 100644 --- a/src/core/StelOBJ.cpp +++ b/src/core/StelOBJ.cpp @@ -746,8 +746,7 @@ bool StelOBJ::load(QIODevice& device, const QString &basePath, const VertexOrder VertexCache vertCache; CurrentParserState state = CurrentParserState(); - static const QRegularExpression separator("\\s"); - separator.optimize(); + static const QChar separator(' '); int lineNr=0; |