File.getContent // macro performence

53 views
Skip to first unread message

Jörg Wasmeier

unread,
Jun 30, 2015, 5:47:17 AM6/30/15
to haxe...@googlegroups.com
Hi there,

for an open source Web Framework i write a little macro which read for each web component an HTML file. 

Since Haxe 3.2 the macro feels very slow. I tried some things and i realized that File.getContent is the bottleneck. 
So i just wonder is there an other option to load (in example) 100 HTML files faster. 

I tried also to create an thread per file but in a macro you cant create an thread :(

Oh and i work on a MacPro with SSD so that should not be the problem.

Any ideas are welcome :)

greetz

Andreas Mokros

unread,
Jun 30, 2015, 7:32:18 AM6/30/15
to haxe...@googlegroups.com
Hi.

On Tue, 30 Jun 2015 02:47:17 -0700 (PDT)
Jörg Wasmeier <in...@creative-code.net> wrote:
> Since Haxe 3.2 the macro feels very slow.

Hm, what does "very slow" mean exactly? Any numbers?
I have similar macros running (I think) but I don't see any slowdown in
3.2 (on Linux, though).
Also, do you use the compilation server? If you create classes from your
HTML-files they should be cached, shouldn't they?

--
Mockey

Jörg Wasmeier

unread,
Jun 30, 2015, 11:36:53 AM6/30/15
to haxe...@googlegroups.com
Yeah perhaps you are right i thing the slowdown is anywhere in the macro. 

thanks

Mark Knol

unread,
Jun 30, 2015, 2:06:23 PM6/30/15
to haxe...@googlegroups.com
You can try to compile your project using -D macro-times, this prints per-macro execution time results (to use together with --times)
Reply all
Reply to author
Forward
0 new messages