You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "george (JIRA)" <xe...@xml.apache.org> on 2008/08/01 14:06:31 UTC
[jira] Commented: (XERCESC-1821) Configurable
kInitialHeapAllocSize in xerces
[ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618995#action_12618995 ]
george commented on XERCESC-1821:
---------------------------------
Here are the comments
1. It serializes document creation over a single global mutex.
===>This only happens once, the global flag readConfig serves the purpose of future mutex
2. It opens a file (worse the file name is hard-coded).
===>this can be improved, or simply take it out, it only serves the purpose of logging
3. It writes log messages to a file (also hard-coded).
===>this can be improved, or simply take it out, it only serves the purpose of logging
4. It uses various system function directly (fopen, atoi) which may not be available or nehave identically on all platforms
===>same as before. atoi function is used in many places in already, therefore I do not see the problem.
so I see there are two things here:
1) hard coded filename
2) fopen/fclose for logging purpose, I can take it out, or keep it there are a trouble shooting tool...nobody will use it in production. or switch to new BinFileInputStream
comments?
> Configurable kInitialHeapAllocSize in xerces
> ---------------------------------------------
>
> Key: XERCESC-1821
> URL: https://issues.apache.org/jira/browse/XERCESC-1821
> Project: Xerces-C++
> Issue Type: Improvement
> Components: DOM
> Environment: All OS
> Reporter: george
> Assignee: David Bertoni
> Priority: Minor
> Fix For: 3.1.0
>
> Attachments: DOMDocumentImpl.cpp, DOMDocumentImpl.hpp
>
>
> The default DOM initial heap size is 16k in the latest release (earlier release was 64k). this number could be still too big or too small for some system.
> The idea is to make the following parameters configurable in the constructor via a singleton read function.
> static XMLSize_t kInitialHeapAllocSize = 0x4000;
> static XMLSize_t kMaxHeapAllocSize = 0x20000;
> static XMLSize_t kMaxSubAllocationSize = 0x1000; // Any request for more bytes
> Now the question is if you think this is a valuable suggestion? I have a working code and would like to share if you think it worth the effort.
> Cheers
> George
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org