gcao / aspect4r

Aspect Oriented Programming for Ruby
http://gcao.posterous.com/
MIT License
26 stars 0 forks source link

Store advices in array #30

Open gcao opened 13 years ago

gcao commented 13 years ago

Advices are stored in an array. Whenever a method is created, the whole array is checked to find the advices that are applicable to it. Those applicable advices are used to construct the new method. This provides a lot flexibilities but can be a performance burden.

gcao commented 13 years ago

One way to improve performance is to use array to store advices that use regular expression. Advices specific to methods are stored in hash. (Do this only when performance is proved to be a problem in real world scenarios)