Opt out of Locking

michael.proepster's Avatar

michael.proepster

01 Dec, 2017 12:04 PM

This is a follow up on this ticket http://support.sharpcrafters.com/discussions/questions/2875-inconsi...

Since you fixed #15515, performance got seriously worse.

Up to now, I could write

[ExplicitlySynchronized]
public int ID {get; private set; }

in order to opt-out of PostSharp instrumentation. (Those properties hardly ever change, but the getter is called 10 million times.
Since 5.0.39 I get the full instrumentation with bells and whistles.
Now the runtime of a certain algorithm has doubled!

Please consider reimplementing a opt-out attribute for locking instrumentation.

  1. Support Staff 1 Posted by PostSharp Techn... on 05 Dec, 2017 03:32 PM

    PostSharp Technologies's Avatar

    Hello,

    Thank you for the feedback on this recent ExplicitlySynchronized fix. To ensure the correct behavior we need to apply advices to the ExplicitlySynchronized class member as well. And this means that ExplicitlySynchronized is still not a good choice for performance-critical code.

    We have planned a feature for PostSharp 5.1 (#15702) to allow exclusion of the selected class members from the thread-aware advising, in a similar fashion as was already planned for the INotifyPropertyChanged aspect.

    -alex

  2. 2 Posted by michael.proepst... on 06 Dec, 2017 08:00 AM

    michael.proepster's Avatar

    Then I am looking forward to 5.1.
    I would like to emphasize that this feature is critical to us. I can't roll out PostSharp like this.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac