mardi 14 avril 2020

Improve the performance of a dispatcher? [closed]

class ExampleDispatcher {
public static void main (String [] args) throws IOException { 
  ExampleDispatcher jobDisp = new ExampleDispatcher ();
   for (; ; ;) { // just an illustrative loop 
      Job job = jobDisp.dispatch(); 
      DoSomeProcessing(job);
}
}
}

After some time, you find that the ExampleDispatcher has poor performance because jobDisp.dispatch() frequently asks the Farm Manager to create slots for new jobs. What steps could you take to improve ExampleDispatcher 's performance?

Aucun commentaire:

Enregistrer un commentaire