Discussion:
One easy way to improve performance a lot
Daniel.Sun
2007-02-09 05:16:06 UTC
Permalink
Hi all,

I found more than 90% time is spent in compiling.
So I think caching these latest compiled groovy class will improve
performance a lot.
The cache pool should be provided with gdk and instance of the pool should
be store in a Thread which is started when we run our application.

pseudocode as follows:
find the requested class from cache.
if (the class is cached) {
if (modifying timestamp of groovy script file > modifying timestamp of
class's groovy script file which is also in the cache) {
recompile the groovy script file and cache it
} else {
return the requested class
}
} else {
compile the groovy script file and cache it
return the requested class
}

Best regards,
Daniel.Sun
--
View this message in context: http://www.nabble.com/One-easy-way-to-improve-performance-a-lot-tf3198618.html#a8880607
Sent from the groovy - jsr mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
Jochen Theodorou
2007-02-12 15:21:40 UTC
Permalink
Post by Daniel.Sun
Hi all,
I found more than 90% time is spent in compiling.
So I think caching these latest compiled groovy class will improve
performance a lot.
The cache pool should be provided with gdk and instance of the pool should
be store in a Thread which is started when we run our application.
find the requested class from cache.
if (the class is cached) {
if (modifying timestamp of groovy script file > modifying timestamp of
class's groovy script file which is also in the cache) {
recompile the groovy script file and cache it
} else {
return the requested class
}
} else {
compile the groovy script file and cache it
return the requested class
}
that's how it is working, or not?

bye blackdrag
--
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
Daniel.Sun
2007-02-13 07:32:24 UTC
Permalink
Yeah, now I'm using JSR223 Groovy-Engine which can cache scripts, so I don't
care whether Groovy will cache scripts or not :)
Thanks for your response :)
Post by Jochen Theodorou
Post by Daniel.Sun
Hi all,
I found more than 90% time is spent in compiling.
So I think caching these latest compiled groovy class will improve
performance a lot.
The cache pool should be provided with gdk and instance of the pool should
be store in a Thread which is started when we run our application.
find the requested class from cache.
if (the class is cached) {
if (modifying timestamp of groovy script file > modifying timestamp of
class's groovy script file which is also in the cache) {
recompile the groovy script file and cache it
} else {
return the requested class
}
} else {
compile the groovy script file and cache it
return the requested class
}
that's how it is working, or not?
bye blackdrag
--
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
View this message in context: http://www.nabble.com/One-easy-way-to-improve-performance-a-lot-tf3198618.html#a8939722
Sent from the groovy - jsr mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
Loading...