473,734 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Attribute Overhead

Hi

Besides some initial startup overhead (possibly), i assume there is no
runtime overhead on
functions which have attributes associated with them ?
(i.e. the function itself or no other code is reading the attributes)

[myattributes]
void myfunction()

Thanks
Feb 7 '06 #1
1 2244
It really depends on the attribute; for your own bespoke attributes (read
via reflection) you should be OK - however many framework attributes (read
by the runtime itself) can change things at either JIT-time or runtime:
[NoInlining] for instance will force an extra call-stack step, potentially
reducing performance; there are others that perform permissions (demand)
checks, security checks, offer transaction support, etc...

Were there any specific ones you were interested in? (although MSDN/MSDN2
will cover all the framework ones)

Marc
Feb 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2805
by: f.ruecker | last post by:
Hey Folks, I hope you'll be nice to me and let this post go through even know its mysql and not directly php. But of course my script is php. The problem is, that my Table (1,8 MIO entries/100 MB/MyISAM) is not working anymore. Everytime my script wants to write in something the number of entries decreases, and at the "Overhead" column the number is growing.
8
9990
by: Roy Smith | last post by:
For the past 6-8 months, I've spent most of my time writing C++ and a little bit of Java. Both of these languages support and encourage the use of private data and explicit accessor functions, i.e. instead of writing x = foo.bar, you write x = foo.getBar(). Now that I'm back to writing Python, I find myself in a quandry. Historically, I've always avoided accessor functions and just reached directly into objects to get the value of...
6
1424
by: Chris... | last post by:
Two simple questions regarding future of Python: 1) Is there already a "fix" to avoid writing to an attribute that isn't defined yet? I remember this being an often discussed problem, but didn't see any changes. The only way I can think of is overriding __setattr__, but this is huge overhead. While I like the idea of being able to add new attributes on the fly, in great projects I'd like to restrict some classes not to do so. 2)...
17
2390
by: Rune Strand | last post by:
Is it an idea to include a new __filename__ predefined attribute to 2.5, so that __file__ contains the entire path to the module, and __filename__ only the name of the module? For instance it's useful to include a not-static reference to the filename in a scripts usage() section and it's cumbersome to extract the filename or to do module imports just to parse it.
8
2150
by: MikeB | last post by:
Hi, I created a picturebox with a map as an image. I want to make certain areas on the map clickable hotspots and the way I'm trying to do this is to create a transparent label with a different cursor (hand) and then I code the click_event for that label. However, I cannot make the label transparent, even if I choose the Transparent option for the attribute for the background color of the label. Any ideas or suggestions? Thanks
3
3033
Plater
by: Plater | last post by:
I am using the onerror event for the image tag in an attempt to save overhead for my server (which will be on a microprocessor) Basicly it tries to load the images from a real server on the internet, if it throws the onerror event, then it grabs them from the microprocessor. This appears to work in both IE and FireFox, but the W3 validator says it's not a valid attribute. It's all in lowercase and I am using the correct doctype for xhtml...
2
1532
by: mark | last post by:
Hi, I am in the process of developing a small application that sits in the task bar and at a set interval polls an IIS web server for information. The process involves the client sending anything between 3 and 30 characters of data and the server returning anything up to 50 characters of data. I need to identify the overhead on the network so I can determine the network utilisation of the application. The sort of questions I need to be...
2
2622
by: mmcgarry.work | last post by:
Hi, I would like to follow Stroustrup's advice of separating an object interface (abstract class) from an object implementation (concrete class), See Section 15.2.5 in Stroustrup 3rd Edition. Specifically, I want to create an abstract base class that defines an object interface: class myAbstractClass
36
2034
by: Peter Olcott | last post by:
So far the only way that I found to do this was by making a single global instance of the container class and providing access to the contained class, through this single global instance. Are there any other no-overhead ways that a contained class can access its container? The obvious choice of passing (a pointer or a reference to the container) to the contained class is not a no-overhead solution, it requires both memory and time. I am...
0
8780
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8190
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6035
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4816
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3264
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.