title: Java FileWriter: Repeated File Open/Close(Multiple Instance) vs Single Open/Close(Single Instance) on Client-Server Environment
body: <p>We currently have a client-server system. We have this application that will monitor the performance of each transactions on our system (start-end time of a request/processing/sql queries...etc.) by writing the logs into a text file on the client's pc.</p>
  
  <p>Our current implementation was on every request, we will open the log file, write the details of the transaction, then close the file for every request that we make. There is also a separate instance of the FileWriter for each client.</p>
  
  <p>We are wondering if it is better to have the text file open all throughout the use of the application and then just close it upon log-out using a single instance of the FileWriter.</p>
  
  <ol>
  <li>What are the impacts of just using a single instance of the FileWriter?</li>
  <li>Would there be a significant speed change when we change the Filewriter from Multiple Instance to single instance?</li>
  </ol>