Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  auto_compile: smerl:compile is too slow

Guest
Posted: Sun Nov 23, 2008 4:17 pm Reply with quote
Guest
Hi all.
I've been digging down to the slowness when auto_compile set to true
and it looks like the call to smerl:compile is pretty slow and is
always being called even if nothing else changed.
To make matters worse, it gets called multiple times when there is a
redirect.
Its in erlyweb_compile:compile/2 near the end.

Everything else seems to be relatively fast so if we could solve this,
auto_compile would be much more tolerable.
I've not had time to figure out a solution so if anyone wants to
contribute, that would be great.

thanks,
michael.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
Guest
Posted: Mon Dec 01, 2008 8:50 pm Reply with quote
Guest
There should be a timeout interval in auto_compile so if less than
some number of milliseconds have passed it won't attempt to recompile.
This prevents multiple auto-compilations when you're loading a page
that loads multiple assets in different requests. You can try to make
it a longer interval. I don't know of any way to make auto compilation
faster. It's fast enough to not bother me though.

Yariv

On Sun, Nov 23, 2008 at 8:16 AM, Michael Mullis
<michael@mullistechnologies.com> wrote:
>
> Hi all.
> I've been digging down to the slowness when auto_compile set to true
> and it looks like the call to smerl:compile is pretty slow and is
> always being called even if nothing else changed.
> To make matters worse, it gets called multiple times when there is a
> redirect.
> Its in erlyweb_compile:compile/2 near the end.
>
> Everything else seems to be relatively fast so if we could solve this,
> auto_compile would be much more tolerable.
> I've not had time to figure out a solution so if anyone wants to
> contribute, that would be great.
>
> thanks,
> michael.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
Guest
Posted: Wed Dec 03, 2008 3:10 pm Reply with quote
Guest
Sorry to say, the last_compile_time check is ineffective in this
situation.

For reference, I'm running Ubuntu desktop on a Q6600 with 4 gig ram.
Erlang is version 5.6.4, [64-bit], [smp:4], [hipe].
I just started working on a simple app and there is no real code in
any of the controllers or views.

Here's all the things that seem to contribute to this issue.
1. The current code checks if last compile time was more than 3
(hardcoded) seconds ago.
2. There are 10 components - all views and controllers using
erlyweb_magic which affects size of <appname>_erlyweb_data
3. smerl:compile on <appname>_erlyweb_data takes close to 6 seconds

The long compile means it slips through the last_compile_time check
and will recompile multiple times when there are redirects - meaning
12+ second waits.

I removed all the erlyweb_magic and this drops the erlyweb_data
compile time down significantly
but that defeats the purpose. I'm trying to get a simple app up and
running and want to use
as much leverage as possible.

The erlyweb_data is dependent on whether something in the controllers/
views changed
so here's some potential solutions.
1. Track whether a controller/view was recompiled and force recompile
on erlyweb_data if needed

2. Delete the erlyweb_data beam file when a controller/view is
recompiled and then later trigger erlyweb_data recompile if the beam
isn't there

3. Check timestamps on the controller/view beam files and recompile
erlyweb_data if it doesn't have the most current timestamp

Other ideas? Did I miss something?

thanks,
michael.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
Guest
Posted: Thu Dec 04, 2008 6:14 pm Reply with quote
Guest
Turn off hipe. It has much slower compilation, and it's unnecessary in
dev mode. Does that help?

On Wed, Dec 3, 2008 at 7:10 AM, Michael Mullis
<michael@mullistechnologies.com> wrote:
>
> Sorry to say, the last_compile_time check is ineffective in this
> situation.
>
> For reference, I'm running Ubuntu desktop on a Q6600 with 4 gig ram.
> Erlang is version 5.6.4, [64-bit], [smp:4], [hipe].
> I just started working on a simple app and there is no real code in
> any of the controllers or views.
>
> Here's all the things that seem to contribute to this issue.
> 1. The current code checks if last compile time was more than 3
> (hardcoded) seconds ago.
> 2. There are 10 components - all views and controllers using
> erlyweb_magic which affects size of <appname>_erlyweb_data
> 3. smerl:compile on <appname>_erlyweb_data takes close to 6 seconds
>
> The long compile means it slips through the last_compile_time check
> and will recompile multiple times when there are redirects - meaning
> 12+ second waits.
>
> I removed all the erlyweb_magic and this drops the erlyweb_data
> compile time down significantly
> but that defeats the purpose. I'm trying to get a simple app up and
> running and want to use
> as much leverage as possible.
>
> The erlyweb_data is dependent on whether something in the controllers/
> views changed
> so here's some potential solutions.
> 1. Track whether a controller/view was recompiled and force recompile
> on erlyweb_data if needed
>
> 2. Delete the erlyweb_data beam file when a controller/view is
> recompiled and then later trigger erlyweb_data recompile if the beam
> isn't there
>
> 3. Check timestamps on the controller/view beam files and recompile
> erlyweb_data if it doesn't have the most current timestamp
>
> Other ideas? Did I miss something?
>
> thanks,
> michael.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
Guest
Posted: Fri Dec 05, 2008 8:57 pm Reply with quote
Guest
That's a big difference. I only played with the app compile options
since they control the options used in recompilation.
I never even thought about the native compile being an issue. Perhaps
I'm spoiled.

I implemented most of the timestamp checking approach before playing
with the compile options so now
I'm on the fence about it's value since it's unlikely anyone would use
auto_compile in production.

Thanks for the tip,
michael

On Dec 4, 1:13
Skylar
Posted: Sat Jan 29, 2011 8:57 am Reply with quote
Joined: 29 Jan 2011 Posts: 1
I guess there’s a timeout interval in some auto files. Some multiple auto compilations can prevent loading different requests. You can approach a computer technician or a programmer and ask him to help you with this.




My Sports Email
View user's profile Send private message
wailian
Posted: Tue Mar 20, 2012 2:49 am Reply with quote
Guest
One of them is the Ugg bailey button boot which has classic and uniquely designed buttons on its body to give that elegant and luxurious look. It has a fantastic look and this includes the Bailey Triplet Boot which has 3 buttons. These boots have a shaft (the upper part of the boot) which can be turned up or turned down depending upon your need. These buttons are both for style or decoration along with being functional or usable as well.
wuji
Posted: Mon Aug 13, 2012 8:22 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
Bent and Brewer in the day leading up to the the [h3]jordan 6 olympic 2012[/h3] the attack.The previous day, Brewer's parents reported Bent to the
for allegedly attempting to steal a family bicycle. Brewer said said imitation designer *beep* said he stayed home from school on Oct. 12 fearing
retaliation by Bent, who he testified Thursday was targeting him him knockoff designer *beep* him because he refused to buy drug paraphernalia from Bent.Denver
17, who is serving eight years in prison for pouring pouring jordan 6 olympic pouring the alcohol on Brewer, testified Wednesday that Bent offered
$5 to do so, Schneider reminded jurors. Other witnesses testified testified cheap Ralph Lauren testified that Bent had offered money to anyone who would
up Brewer.Bent's attorneys rested their case Monday morning without calling calling [h4]cheap replica *beep*[/h4] calling a single witness and told the court that Bent
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum