Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6085357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:37:48+00:00 2026-05-23T11:37:48+00:00

I am looking for a way to mark somehow the code that can be

  • 0

I am looking for a way to mark somehow the code that can be optimized, so that me or anyone who comes after me on the project, knows what and how can be optimized when performance becomes a challenge.

Reason why I don’t optimize at the moment is that code clarity is most of the times more important than code optimization, based on my and many other’s experience (e.g. check "Effective Java Programming" of Joshua Block). Thus I prefer to keep code clear and easy to understand (which basically means, implement things the way anyone would do it, try no fancy stuff until really needed). Though, when performance becomes an issue, it is good to know exactly where to look into and do the optimizations at the cost of loosing from code clarity.
I would like to be able to mark the places where code can be optimized and give some hints on how though.

The way I was thinking to do so is by using an annotation like:

public class UserDao {
    @Optimizable (hint="cache returned data; ")
    public List<User> getUsers(int userType) {
        //some code getting user and checking if user is of that type.
    }
}

Is there a standard – community wide used – way to mark your code for such? Or do you have a better idea of how to do it?

Using annotation makes it easy for tools to check for optimizable code and generate some reports for that. Another way might be to use a javadoc like tag, but not sure how easy a tool might be able to discover that.

Thanks,
Stef.

ADDED:

Ok, seems that Rick’s answer covers all ways of doing this in comments.
How about annotations though? I find this to have some advantages as you can discover code issues/optimization options even if you don’t have source code and optimize by offering a new implementation for those methods/classes and take advantage of polymorphism. Do you know if there are any standard annotations for such?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:37:48+00:00Added an answer on May 23, 2026 at 11:37 am

    I know about three standard tags in comments:

    • TODO : non-critical issue for next release; used for optimizations
    • XXX : critical issue, but code is working; needs to be looked at before next release
    • FIXME : critical issue, non-working code; this marks real bugs

    TODO and FIXME are well known and discussed above.

    XXX is typically used for sections which are working in the current state, but need to be removed. These are typically ugly hacks to fix a bug in short period, strongly coupled code which assumes strong environmental conditions which might change and code which is known to work, but assumed to be unstable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a way to mark when text overflows it's container. The code
Is there a way that I can force the help question mark button to
I'm looking for a way to visually mark or tag a window (any OS)
I looking for a way, specifically in PHP that I will be guaranteed to
I'm looking for a nice way to mark/select all elements between two selected elements.
I am looking for a quick way to share code snippets between developers. Visual
I'm looking for way to PHP to detect if a script was run from
I'm looking a way to enable IP logging with log4net in ASP.NET. I found
I'm looking for way to write Javascript programs / scripts on desktop, not inside
I'm looking a way to build conditional assignments in bash: In Java it looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.