Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] [jira] Created: (UDIG-525) Job creation is getting out of control.

I must admit i am guilty of this one. I was not aware that there was a correct way to set up a job. If you could provide an example Jesse i would be happy to change code where i have done this.

Jesse Eichar (JIRA) wrote:
Job creation is getting out of control.
---------------------------------------

         Key: UDIG-525
         URL: http://jira.codehaus.org/browse/UDIG-525
     Project: uDIG
        Type: Bug
Components: ui Versions: UDIG 1.0.RC6 Reporter: Jesse Eichar Assigned to: Jesse Eichar Priority: Critical
     Fix For: UDIG 1.0.SC1


Jobs are intended to be reused.  Some places our code the jobs being created but not reused.  One example is:

UDIGDropHandler :106

Code like the following is VERY bad:

Job job=new Job();

job.schedule();

The reason this is bad is because eclipse does not get rid of jobs once they are created like this.  so given 10 uses of this code we will have 10 jobs(threads) hanging around.  I currently have 70 jobs sleeping in my workspace but I'm only about 10 will ever be used again.

Known places:
UDIGDropHandler :106        Justin?
MapFactory:166  assigned  Jesse?Justin?Richard?
ViewportPaneJava:313        Jesse
ToolProxy:49                        Jesse
SearchPart:487                   Jody
CompositeRenderExecutor:212  Jesse
MapEditor:475                    Jesse
RenderExecutors make too many: Jesse SelectionLayerListener:84 Jesse




--
Justin Deoliveira
Refractions Research Inc.
Email: jdeolive@xxxxxxxxxxxxxxx
Phone: 250.885.4387


Back to the top