I'm writing an attribute which marks a method so that it can be displayed as a button that calls the method when clicked.
It seems appropriate that the attribute should be given the MethodInfo of the method I get it off, and that it can draw itself on screen and call that method when it gets clicked. That way the class is nice and self contained.
But I've never seen an attribute class that contains its actual functionality. They're always just data containers which are used by other classes.
Is there an actual performance related reason why functionality should be kept out of attribute classes?
No, there's no performance related reason per se. It's more that attributes are meant as a way to add additional, declarative metadata for use with reflection.
One reason to not put too much functionality into an attribute is often that they only accept compile-time constants in the constructor(s), so you won't get constructor dependency injection. This is often solved by using method injection of dependencies instead.
ASP.NET MVC does this for their
AuthorizationFilterAttribute
and its derived attributes. You can take a look at different attributes with "behavior" in ASP.NET's filters test website here.