Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: A peculiar performance problem: Application get's faster after adding more logging.

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A peculiar performance problem: Application get's faster after adding more logging.

    Me and my colleagues are thinking about how to solve a rather unique situation /at least in my experience/.

    Our customers have been complaining about how fast [ how slow, to be more precise ] our application processes files [each about 1kB usually ] ... so we've spent some time inspecting the code of the would-be-thread and added a few lines for log4j to measure time between every operation to find out on which parts to focus. Up to this point it's all normal. The strange part comes that EVERY part to which we logged the starting and ending point got a LOT faster [ try 20 times faster ] normally it would take 4-10 seconds, depending on what else was running on the machine, but after adding the logs it suddenly dropped to 0.3-1.6 seconds per file.

    Does anyone have a notion as to what we're looking for? We can't seem to find anything.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    It sounds like you may have some kind of race condition problem.

  3. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    Well... in a way, but this thread is the only thread with this set of instructions. There is nothing that can interfere...

  4. #4
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    It's hard to tell without taking a look at the code, do you have a short example you could post for us to look at?

  5. #5
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    I presume you asked this same question at Stack overflow. If not, perhaps the responses there might help. If it is, I recommend being forthright when posting to multiple forums.

  6. #6
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    Yep, I did post it to the StackOverflow, after posting here. I though that more opinions would help the search. But for now the search is halted until tomorrow evening, we have to make sure that the newest version works as it's supposed to, therefore the whole team is checking whether the last fixes work as they should...

    As for being forthright, I tried to, but to be honest, there's plenty of what I wasn't sure I could post on-line. As for the code, I'm not allowed to post it. As said, there's parts of my contract, which would get me a hefty fine and into a lot of legal trouble.

    One of the problems is I never wrote the code [ I mean, I wrote SOME code, but not the problematic code in question ] , I joined the team just a year ago and I'm still "a girl for everything" , So I have to be careful.

  7. #7
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    As for being forthright, I tried to, but to be honest, there's plenty of what I wasn't sure I could post on-line. As for the code, I'm not allowed to post it. As said, there's parts of my contract, which would get me a hefty fine and into a lot of legal trouble.
    Perhaps you misunderstand what I mean by being forthright - it has nothing to do with how much code you are capable of posting. It has to do with posting the same question on multiple sites - and in doing so keeping everyone, everywhere you posted, on the same page - as a result it helps to avoid wasting everyone's time.

    It is not against the rules of this forum, but I speak from experience that not making members aware of crossposts, should they be found by someone else, does not help your cause. Suggested reading: http://www.javaprogrammingforums.com...s-posting.html

  8. #8
    Junior Member
    Join Date
    May 2012
    Posts
    11
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: A peculiar performance problem: Application get's faster after adding more loggin

    You should pastebin.com the code so we can see it. You can leave out vital parts that you don't feel affect the program.

Similar Threads

  1. Adding a menu to an application (NetBeans)
    By Alex555 in forum Java Theory & Questions
    Replies: 3
    Last Post: February 12th, 2012, 06:26 AM
  2. How to speed up the performance of the java application
    By Sathiyan in forum Java Theory & Questions
    Replies: 4
    Last Post: December 2nd, 2011, 02:09 AM
  3. Adding sound to a game application
    By Shaybay92 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 13th, 2011, 07:56 AM
  4. Please help!!! Adding java app to a web application
    By snapper in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 19th, 2011, 10:26 AM
  5. problem of logging in ejb3
    By mousumi in forum Enterprise JavaBeans
    Replies: 2
    Last Post: February 1st, 2010, 06:35 AM

Tags for this Thread