Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tetris [2009/10/16 21:35] aspectscript |
tetris [2009/10/26 17:35] (current) aspectscript |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tetris Game ====== | ====== Tetris Game ====== | ||
- | At the left it is the [[http:// | + | This is a demonstration of how the overhead introduced by AspectScript in an interactive application is negligible. Please try the game and let us know if you feel any noticeable difference! |
- | At the right it is the instrumented version, with an aspect deployed this way: | + | |
+ | On the left it is the [[http:// | ||
+ | On the right it is the instrumented version, with one global | ||
<code java> | <code java> | ||
- | var pointcut = function(){ | + | var pointcut = function(){ return true; }; |
- | | + | var advice |
- | }; | + | |
- | var advice | + | |
- | return jp.proceed(); | + | |
- | }; | + | |
AspectScript.around(pointcut, | AspectScript.around(pointcut, | ||
</ | </ | ||
- | At the bottom of the page you can observe | + | The counter below the game frames shows the number of jp seen by the aspect. |
< | < | ||
- | <iframe src="/ | + | <iframe src="/ |
<iframe src="/ | <iframe src="/ | ||
</ | </ | ||
< | < | ||
- | <div style=" | + | <div style=" |
| | ||
<script type=" | <script type=" | ||
Line 33: | Line 31: | ||
}, 1000); | }, 1000); | ||
</ | </ | ||
+ | |||
</ | </ |