Compiling with erlyweb:compile(Appdir,...) takes quite some time, and compiling with {auto_compile,true} makes every request take a while, so is there some way to get to the "compile all of the changed files" functionality directly?
You can pass the {last_compile_time, Time} option to erlyweb:compile(), and it will only compile the files that have changed since that time (for convenience, erlyweb:compile() returns the Time value after each compilation).
Is {auto_compile, true} slow for you? I haven't noticed its impact.
Yariv
On Nov 15, 2007 6:28 PM, David King <dk...@ketralnis.com> wrote:
> Compiling with erlyweb:compile(Appdir,...) takes quite some time, and > compiling with {auto_compile,true} makes every request take a while, > so is there some way to get to the "compile all of the changed files" > functionality directly?
If I remember properly, I once had a such a situation, where it can
get slow, if you have a lot of static files served (or better: passed
through) by Erlyweb, then you also have a lot of requests per page,
which are going to be checked whether it is something to recompile,
end erlyweb is printing for each file a warning to the interactive
shell, which is also slow (but can be suppressed I think).
On Nov 16, 4:29 am, "Yariv Sadan" <yarivsa...@gmail.com> wrote:
> You can pass the {last_compile_time, Time} option to
> erlyweb:compile(), and it will only compile the files that have
> changed since that time (for convenience, erlyweb:compile() returns
> the Time value after each compilation).
> Is {auto_compile, true} slow for you? I haven't noticed its impact.
> Yariv
> On Nov 15, 2007 6:28 PM, David King <dk...@ketralnis.com> wrote:
> > Compiling with erlyweb:compile(Appdir,...) takes quite some time, and
> > compiling with {auto_compile,true} makes every request take a while,
> > so is there some way to get to the "compile all of the changed files"
> > functionality directly?
> You can pass the {last_compile_time, Time} option to > erlyweb:compile(), and it will only compile the files that have > changed since that time (for convenience, erlyweb:compile() returns > the Time value after each compilation).
Since obviously {auto_compile,true} already retrieves its last compile time from somewhere, can we get a {last_compile_time,auto} or something in a future release?
> Is {auto_compile, true} slow for you? I haven't noticed its impact.
Yes, it at least triples the access time for pages when no files require re-compiling (of course the impact is more when there are files that do need compiling, but that's expected). Roberto mentioned that this could be due to lots of static files, but that's not the case here; I only have one .js and one .css being served in addition to the rendered pages.
> On Nov 15, 2007 6:28 PM, David King <dk...@ketralnis.com> wrote:
>> Compiling with erlyweb:compile(Appdir,...) takes quite some time, and >> compiling with {auto_compile,true} makes every request take a while, >> so is there some way to get to the "compile all of the changed files" >> functionality directly?
On Nov 16, 2007 9:12 AM, David King <dk...@ketralnis.com> wrote:
> > You can pass the {last_compile_time, Time} option to > > erlyweb:compile(), and it will only compile the files that have > > changed since that time (for convenience, erlyweb:compile() returns > > the Time value after each compilation).
> Since obviously {auto_compile,true} already retrieves its last > compile time from somewhere, can we get a {last_compile_time,auto} or > something in a future release?
> > Is {auto_compile, true} slow for you? I haven't noticed its impact.
> Yes, it at least triples the access time for pages when no files > require re-compiling (of course the impact is more when there are > files that do need compiling, but that's expected). Roberto mentioned > that this could be due to lots of static files, but that's not the > case here; I only have one .js and one .css being served in addition > to the rendered pages.
> > Yariv
> > On Nov 15, 2007 6:28 PM, David King <dk...@ketralnis.com> wrote:
> >> Compiling with erlyweb:compile(Appdir,...) takes quite some time, and > >> compiling with {auto_compile,true} makes every request take a while, > >> so is there some way to get to the "compile all of the changed files" > >> functionality directly?
> On Nov 16, 2007 9:12 AM, David King <dk...@ketralnis.com> wrote: >>> You can pass the {last_compile_time, Time} option to >>> erlyweb:compile(), and it will only compile the files that have >>> changed since that time (for convenience, erlyweb:compile() returns >>> the Time value after each compilation). >> Since obviously {auto_compile,true} already retrieves its last >> compile time from somewhere, can we get a {last_compile_time,auto} or >> something in a future release? > That's a good suggestion. I'll do it.
Thanks. Do you have a trac or bugzilla or something somewhere? Can I get an account on it?
>>> Is {auto_compile, true} slow for you? I haven't noticed its impact.
>> Yes, it at least triples the access time for pages when no files >> require re-compiling (of course the impact is more when there are >> files that do need compiling, but that's expected). Roberto mentioned >> that this could be due to lots of static files, but that's not the >> case here; I only have one .js and one .css being served in addition >> to the rendered pages.
>>> Yariv
>>> On Nov 15, 2007 6:28 PM, David King <dk...@ketralnis.com> wrote:
>>>> Compiling with erlyweb:compile(Appdir,...) takes quite some >>>> time, and >>>> compiling with {auto_compile,true} makes every request take a >>>> while, >>>> so is there some way to get to the "compile all of the changed >>>> files" >>>> functionality directly?
>> Thanks. Do you have a trac or bugzilla or something somewhere? Can I >> get an account on it? > The Google Code project has a bug tracker, but I don't use it. Maybe > it's a good time to start :)
Agreed. I'm willing to work on the stuff I'm asking for, but I don't want to duplicate the work where you've already started
> > Is {auto_compile, true} slow for you? I haven't noticed its impact.
> Yes, it at least triples the access time for pages when no files > require re-compiling (of course the impact is more when there are > files that do need compiling, but that's expected). Roberto mentioned > that this could be due to lots of static files, but that's not the > case here; I only have one .js and one .css being served in addition > to the rendered pages.
Wow... I guess I made a n00b mistake on Vimagi by setting {auto_compile, true}. I just removed it and the site feels much snappier -- almost as fast as BeerRiot, in fact :) Thanks for the tip.