-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tink_template is slow #4
Comments
Adding |
It's not hard to change, but it potentially breaks a lot of code that depends on the current behavior. I'm not sure what to do about it. |
It is pre-1.0.0 anyway... |
You are right about that. Also the library is not very widely used yet, so better break it sooner than later. Still, I wouldn't want to take it too lightly, particularly because I have another rather big change in mind and I would like to make them simultaneously, to avoid breaking stuff too often. When it comes to compile time, I think removing the template frontend should yield the most benefits, as the I think that for field level templates I would prefer for it to be applied if there's a |
Good to know! |
Yeah, tink_syntaxhub works pretty well with the compilation server. There is one known issue for which I already got a pull request that I'm trying to fully understand myself. In fact if you do get to use the compiler cache, then the current field level templates are cheap (but the If I may go off-topic here: how about moving ufront from minject to dodrugs? |
Yeah, I would like to do so. But you may already noticed, dodrug doesn't compile on haxe 3.3 at the moment. |
It turns out that the problem with minject is a simple fix ufront/ufront-mvc#53 (comment) |
@back2dos I'm seeing a lot of time spent on "typing" when using field level templates (a handful of field templates made the build time increase 5 times). I'll looking into this now... |
Just an update: most of the time is being spent on my proposed change to the SyntaxHub (haxetink/tink_syntaxhub#4). Ops! : ) On another front, I implemented something in the lines of "not traversing all class fields" but maintaining backwards compatibility... It didn't seem to make too much difference, but I'll test it some more and it might eventually become a PR. |
Currently tink_template is pretty slow in terms of compile time.
The main problem is that it traverse all members of all types to check for a
@:template
metadata.https://github.com/haxetink/tink_template/blob/23aa9f6/src/tink/Template.hx#L107
I think it should better check for some meta at class level first, before diving into all the fields of that class.
The text was updated successfully, but these errors were encountered: