db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2339) org.apache.derbyTesting.functionTests.suites.All is extremely CPU intensive since ~svn 507489
Date Thu, 15 Feb 2007 23:25:05 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473559

Bernt M. Johnsen commented on DERBY-2339:

Ok Dan. The original code was somewhat complex, few comments, had bad indentation (some lines
with tabs and some with spaces), had nested ifs both with and without braces and used both
break and return to exit the loop in run() (in this case, both had the same effect and terminated
the thread). The changes I needed, made the code even more messy, so I decided to rewrite
it. Due to the problems mentioned, I misinterpreted the original semantics. Lessons learned:
1) If the semantics is complex: Comment generoulsy
2) Use braces, especially important when if statements are nested (and layout is bad)
3) Use a proper and readable layout

> org.apache.derbyTesting.functionTests.suites.All is extremely CPU intensive since ~svn
> ---------------------------------------------------------------------------------------------
>                 Key: DERBY-2339
>                 URL: https://issues.apache.org/jira/browse/DERBY-2339
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions:
>         Environment: All
>            Reporter: Ole Solberg
>         Assigned To: Bernt M. Johnsen
>             Fix For:
>         Attachments: derby-2339-v2.diff, derby-2339-v2.diff, derby-2339.diff
> Run org.apache.derbyTesting.functionTests.suites.All.
> http://www.nabble.com/org.apache.derbyTesting.functionTests.suites.All-is-extremely-CPU-intensive%21-tf3230539.html
> See e.g. 
> http://dbtg.thresher.com/derby/test/tinderbox_trunk16/jvm1.6/testing/Limited/testSummary-507489.html
> http://dbtg.thresher.com/derby/test/trunk15/jvm1.5/testing/Limited/testSummary-507650.html
> These logs also include thread dumps.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message