On 04/12/2016 08:00 PM, Dmitry Yemanov wrote:
> 12.04.2016 15:31, Dimitry Sibiryakov wrote:
>
>> On the other hand we can restore logic described in declaration of 
>> system_error and
>> eliminate using of dynamic strings inside of this class. In this case 
>> StaticStatusVector
>> should be fine.
> I will commit a different solution. Testing it now.
>

Sorry could not answer yesterday. I see no problems with your change. 
Strings must be saved somewhere, fast-and-simple StatisStatusVector is 
usable only in a scope of an object, holding them. Performance issues 
when processing an error are not critical - compared with resources 
needed for exception throwing and catching 1 or 2 additional allocations 
of (sooner of all) small blocks are not a problem.

But there are some strange issues with the code. First - why do we show 
last error happened? Typically showing first error is better choice. And 
we use exactly this logic when for example enumerate providers in yvalve 
- first not last error shown. Next, no space state in first directory in 
the list is more or less usual case - first dir is on fast SSD, next on 
slower but very big regular HDD. And if we talk about performance 
raising an error in that case is not very good idea - may be 
TempFile::extend() should learn to return false instead raising an 
error, at least at request of caller? Last (but not least) I do not see 
a place where file is deleted in case when extend failed - appears we 
have small memory leak.


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to