Community
Participate
Working Groups
BufferOutputStream.write is intensivelly used method on data load. Our medel was comparing small with ~3500 node and this method was called 5.5 mln times during loading model. Any unecessarry call is undesired on such load.
Created attachment 189193 [details] patch v1
Have you measured then performance gain? This way or that way I'm fine with your changes. Maybe we want to make ensureBuffer() private so that the compiler has a chance to inline it? Similarly there's inlining potential by making the public flush() method call a new private method which is then also called by flushIfFilled(). If all this helps you may want to look at BufferInputStream, too...
Method took about 12% of total call time (was visible after applying 337397 patch). Not such big overhead, but fix by itself is trivial. Added fix to the BufferInputStream too. However with your suggestion about inline I am not sure. I left it untouch. fixed in trunk, revision 7177
Committed revision 7183: - trunk/plugins/org.eclipse.net4j
Available in R20110608-1407