-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Labels
-libsLibraries: New libraries to be implementedLibraries: New libraries to be implementedl-datetimeLibraries: date/time utilitiesLibraries: date/time utilitiesl-readdatap-lowestShould be completed at some pointShould be completed at some point
Milestone
Description
Currently, our date/time parsing logic, that is used e.g. when loading CSV files is relying on Exceptions to signal parse failure:
enso/std-bits/table/src/main/java/org/enso/table/parsing/BaseTimeParser.java
Lines 21 to 29 in 12c4f29
| protected Object parseSingleValue(String text, ProblemAggregator problemAggregator) { | |
| for (EnsoDateTimeFormatter formatter : formatters) { | |
| try { | |
| return parseStrategy.parse(text, formatter); | |
| } catch (DateTimeParseException ignored) { | |
| // TODO I think ideally we should try to return Option instead of throwing, as throwing is | |
| // inefficient | |
| } | |
| } |
As we know, that is not very efficient - especially in GUI mode the stack traces tend to be quite big which incurs a significant performance cost to the parsing.
At some point, we should try to change the implementation to avoid the exceptions - we were already moving in this direction with #6018.
Metadata
Metadata
Assignees
Labels
-libsLibraries: New libraries to be implementedLibraries: New libraries to be implementedl-datetimeLibraries: date/time utilitiesLibraries: date/time utilitiesl-readdatap-lowestShould be completed at some pointShould be completed at some point
Type
Projects
Status
📤 Backlog