Giter Site home page Giter Site logo

Comments (6)

andrzejkrzywda avatar andrzejkrzywda commented on May 25, 2024

It can be related to this part of code:

https://github.com/deanwampler/Aquarium/blob/master/aquarium/lib/aquarium/aspects/aspect.rb#L435-L457

  #--
  # By NOT dup'ing the join_point, we save about 25% on the overhead! However, we
  # compromise thread safety, primarily because the join_point's context object will be changed.
  # TODO Refactor context out of static join point part.
  # Note that we have to assign the parameters and block to the context object in case
  # the advice calls "proceed" or "invoke_original_join_point" without arguments.
  #++

It seems to be an optimization, that may be less important in places where we care about Thread safety.

from aquarium.

deanwampler avatar deanwampler commented on May 25, 2024

Thanks for pointing that out. I'll take a look this weekend.
dean

On Fri, Jul 19, 2013 at 6:40 AM, Andrzej Krzywda
[email protected]:

It can be related to this part of code:

https://github.com/deanwampler/Aquarium/blob/master/aquarium/lib/aquarium/aspects/aspect.rb#L435-L457

#--

By NOT dup'ing the join_point, we save about 25% on the overhead! However, we

compromise thread safety, primarily because the join_point's context object will be changed.

TODO Refactor context out of static join point part.

Note that we have to assign the parameters and block to the context object in case

the advice calls "proceed" or "invoke_original_join_point" without arguments.

#++

It seems to be an optimization, that may be less important in places where
we care about Thread safety.


Reply to this email directly or view it on GitHubhttps://github.com//issues/39#issuecomment-21243017
.

Dean Wampler, Ph.D.
"Functional Programming for Java Developers",
"Programming Scala", and
"Programming Hive" - all from O'Reilly
twitter: @deanwampler, @chicagoscala
http://polyglotprogramming.com

from aquarium.

andrzejkrzywda avatar andrzejkrzywda commented on May 25, 2024

@deanwampler Any news here? We already use aquarium in places where thread-safety doesn't matter, but it would be great to use it also in thread-sensitive environments.

Is there any way we can help you here?

from aquarium.

chicagoscala avatar chicagoscala commented on May 25, 2024

Hi, Andrzej,

Thanks for bugging me about this. I haven't had any time recently to work
on this, between client commitments and too many conferences recently.
However, I took the time today and have it working.

It was actually a simple one-line change to
Aspect::alias_original_method_text. It now makes a copy of the joinpoint
rather than sharing a mutable one. I needed time to test this and verify
that the performance was acceptable. When I wrote Aquarium circa 2006, the
overhead for copies was 30%! It's now considerably smaller, no doubt due to
improvements in both cruby and hardware.

I have pushed these changes to GitHub. It will be version 0.6.0, which I'll
release as soon as I can. I need to get the jruby tests passing first and
also update the packaging and publishing rake tasks (Unfortunately, since I
don't work very often with Ruby these days, when I need to revisit
Aquarium, I often need to update rake and other stuff, including the
packaging and publishing tools, etc.)

So, I may not have time tomorrow or the next several days (travel), but
worst case, I'll get that done by next weekend.

Yours,
Dean

On Fri, Sep 27, 2013 at 8:22 AM, Andrzej Krzywda
[email protected]:

@deanwampler https://github.com/deanwampler Any news here? We already
use aquarium in places where thread-safety doesn't matter, but it would be
great to use it also in thread-sensitive environments.

Is there any way we can help you here?

Reply to this email directly or view it on GitHubhttps://github.com//issues/39#issuecomment-25244458
.

Dean Wampler, Ph.D.
"Functional Programming for Java Developers",
"Programming Scala", and
"Programming Hive" - all from O'Reilly
twitter: @deanwampler, @chicagoscala
http://polyglotprogramming.com

from aquarium.

deanwampler avatar deanwampler commented on May 25, 2024

Ij

from aquarium.

deanwampler avatar deanwampler commented on May 25, 2024

I released v0.6.0 with this fix.

from aquarium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.