echou opened a new issue, #2066:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/2066
In my project, some crates have very long compilation times (e.g., 40-50
seconds, with the codegen phase accounting for 70%-90% of that time). I suspect
these crates are slow to compile due to their dependency on sqlparser.
I analyzed the compilation of one such crate using cargo llvm-lines. The top
functions by lines are listed below:
```
Lines Copies Function name
----- ------ -------------
2180708 31532 (TOTAL)
220326 (10.1%, 10.1%) 21 (0.1%, 0.1%) <sqlparser::ast::Statement as
sqlparser::ast::visitor::VisitMut>::visit
163970 (7.5%, 17.6%) 1995 (6.3%, 6.4%) <alloc::vec::Vec<T> as
sqlparser::ast::visitor::VisitMut>::visit
117960 (5.4%, 23.0%) 3654 (11.6%, 18.0%) <core::option::Option<T> as
sqlparser::ast::visitor::VisitMut>::visit
76507 (3.5%, 26.5%) 21 (0.1%, 18.0%) <sqlparser::ast::Expr as
sqlparser::ast::visitor::VisitMut>::visit
```
As shown, the visitor trait implementations for the AST types generate a
significant amount of code. Is there any way to reduce the code generation
footprint of sqlparser?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]