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/07/17 17:51:31 UTC

[jira] Created: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

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
            Priority: Minor


The default  DOM initial heap size is 64k (


static XMLSize_t kInitialHeapAllocSize =  0x4000;
static XMLSize_t kMaxHeapAllocSize     =  0x20000;
static XMLSize_t kMaxSubAllocationSize =  0x1000;  // Any request for more bytes


-- 
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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615543#action_12615543 ] 

Alberto Massari commented on XERCESC-1821:
------------------------------------------

George,
I think the current code is a good compromise for a generic XML parser: it starts with a decent pool that doesn't waste too much space, and grows dynamically up to 512Kb in a rapid way. Moreover, if the user know he is loading a big document and wants to reduce the number of pool items, he can tune the parameter per document. Allowing the user to change the initial value globally would introduce 
a) synchronization problems 
b) a performance penalty if we have to guard the variable with a mutex 
c) defeat compiler optimizations if the variable is no more a const 

But in any case, if you really think that your project must use a different approach, you are free to change the code and recompile Xerces in the way it suits you.

Alberto

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Updated: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

george updated XERCESC-1821:
----------------------------


Alberto, can you pleas reopen thsi?
The reason we make it configruable is that the default setting let us to avoid changing thousands if not millions of places if we uses the proposed API at a very big system here.
thanks

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632487#action_12632487 ] 

george commented on XERCESC-1821:
---------------------------------

Thanks Boris,  I downloaded the source, and compiled in windows, search around the change you have made and it looks good to me.  It would be nice to include in one of the test sample, so people realize there is a feature of this.  I see 10% memory footprint reduction in my case, and saved me running ove 2GB limit in windows.

> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615855#action_12615855 ] 

David Bertoni commented on XERCESC-1821:
----------------------------------------

I agree with Scott that (a) and (b) are non-issues, as long as we document that setting the default value is not synchronized.

As for Scott's question regarding (c): There is no way now to change the default value.  Rather, after constructing a DOMDocumentImpl instance, you can call DOMDocumentImpl::setMemoryAllocationBlockSize().  That means you need to call it for every document you create, if you don't like the default block size.

I doubt that the performance improvement of initializing one member variable from a constant rather than a static variable is even measurable given what else goes on in the constructor.

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618996#action_12618996 ] 

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 to avoid future mutex call
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


[jira] Updated: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov updated XERCESC-1821:
-------------------------------------

    Fix Version/s:     (was: 3.0.0)
                   3.1.0

There are a number of issues with the proposed "config" implementation:

1. It serializes document creation over a single global mutex.
2. It opens a file (worse the file name is hard-coded).
3. It writes log messages to a file (also hard-coded).
4. It uses various system function directly (fopen, atoi) which may not be available or nehave identically on all platforms we support.

Overall this idea is an overkill. I think a way to change the global parameters during Xerces-C++ intialization will be enough for 99.9% of cases.

BTW, I've re-scheduled this to 3.1.0 since 3.0.0 is now in a feature freeze.


> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618507#action_12618507 ] 

Boris Kolpackov commented on XERCESC-1821:
------------------------------------------

3.0.0 allows you to configure DOM heap block size on a per-document basis. I think I saw you commenting on several occasions that this is good enough for your use case. This bug report (which is where I first heard of the idea to configure global parameters) was filed on 17/Jul/08, 11 days before the beta. Also during the vote for the beta, which happened a week before the release, I made it clear that after the beta no new features will be accepted unless we discover a serious issue and another beta cycle is neccessary. From my perspective, all interested parties were given ample opportunity to sneak in last minute changes, so, sorry, this won't make it into 3.0.0.

> 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


[jira] Updated: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

george updated XERCESC-1821:
----------------------------

    Attachment: DOMDocumentImpl.hpp
                DOMDocumentImpl.cpp

Here is the sample.  Essentially,  a singleton is implmented in getConfig method, which  intialize the three parameters discussed.   This is a thread safe implementation, and there is only one additional io hit per system instance. I have tested the code in windows, AIX, HP-UX, LINUX.

I understand there are room to improve in terms of performance, please comment.  I will be glad to include it.  
George Xu

> 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.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623028#action_12623028 ] 

george commented on XERCESC-1821:
---------------------------------

thanks Dave.  Can you show the sample to see if I can use it here? George

> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618516#action_12618516 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

For the record, the original bug is here, though there's not much in the comments. I think some discussion took place on the list, but it was tabled quickly because I was expecting 3.0 to just add the primary API I needed.

https://issues.apache.org/jira/browse/XERCESC-1475

I think I somehow lost track of the fact that it hadn't been added, and when I saw this new bug, I jumped in realizing that it hadn't been fixed.

> 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


[jira] Reopened: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari reopened XERCESC-1821:
--------------------------------------


I am not worried about the constructor, but about the allocate() function; but it turns out that the penalty is only 3% of the single instruction time, and this doesn't change the overall impact of the whole function (that is around 6% of the parsing time). As it looks it's acceptable to the community to have such a feature, I am reopening the bug; David, can you take care of it?

Alberto

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631073#action_12631073 ] 

Boris Kolpackov commented on XERCESC-1821:
------------------------------------------

Please see: http://xerces.apache.org/xerces-c/source-repository.html The 3.0.0 codebase is in the trunk.


> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621270#action_12621270 ] 

george commented on XERCESC-1821:
---------------------------------

ok.  I will look into PlatformsUtils.Initialize() and propose a new code later this month, hope it will be ready for 3.1.  (what is the release schedule?).  It should be ok to be not thread safe in terms of variable setting themself as the intention is to get thousands (if not millions) of calls use a more flexible setting.  A few out of order setting use the current predefined setting should be acceptable.  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


[jira] Assigned: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni reassigned XERCESC-1821:
--------------------------------------

    Assignee: David Bertoni

> 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.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619042#action_12619042 ] 

Boris Kolpackov commented on XERCESC-1821:
------------------------------------------

You are using the so called "double-checked locking" approach which is well known to be incorrect (we have removed all instances of it in 3.0.0). So you will have to lock the mutex every time a document is created which is too high an overhead. 

Overall, I think the only sensible way to allow what you want is to have a non-thread-safe way (via PlatformUtils::Initialize()) to change global settings.


> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616359#action_12616359 ] 

Boris Kolpackov commented on XERCESC-1821:
------------------------------------------

A couple of suggestions:

1. Make sure that this facility allows changing all three values.
2. I suggest that you overload PlatformUtils::Initialize() function with the three extra arguments since that's the place users already know is not thread-safe.


> 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.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631069#action_12631069 ] 

george commented on XERCESC-1821:
---------------------------------

I'd love to try out Boris, can you tell me where is SVN as this is the first time get into this?  thanks!

> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618515#action_12618515 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

Good enough != good. I think it's still twice what it should be for any use case involving XML protocols. Changing it per document is pretty much out of the question, particularly since it's too late by then and I've lost the initial memory allocation.

The report I'm referring to is a different bug that I filed years ago and we closed after changing the allocation sizes. I wanted per-application control, but at the time it wasn't possible until we could make the API changes. I certainly asked for this same change back then, so I guess I didn't get my point across.

Anyway, not much I can do, I'll just have to see how things are sizing up once 3.0 is out.


> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615768#action_12615768 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

I'm not sure (a) is a big deal. There are plenty of things people just know not to do while parsing, this would be one of them. Most applications with this requirement have a clearly defined startup phase that doesn't require synchronization with the actual worker threads.

Given that, (b) is a non-issue.

I'm not sure about (c), and if you have any way to change the value, it can't be const, so didn't you already lose that?

Anyway, while I can live with the 16K, I don't like it much and would love a way to configure it to use 8k in my application in one spot.

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631032#action_12631032 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

I will test it by tomorrow, but that sounds fine for my purposes. Thanks.

> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632488#action_12632488 ] 

george commented on XERCESC-1821:
---------------------------------

One additional comment,  I still fell it would be nice to have a configuration file.  I have hundreds of DLLs in one project, and it would be a a big effort to add this change into all these components, or the feature will never be used.  sorry being stubborn

> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618473#action_12618473 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

I agree with the overkill comment, but if there's any way to get this into 3.0.0, it would be hugely helpful. I asked for this change a long time ago, long before 3.0 was even close to beta.

> 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


[jira] Closed: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov closed XERCESC-1821.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.1.0)
                   3.0.0
         Assignee: Boris Kolpackov  (was: David Bertoni)

I didn't like the idea of people waiting (and expecting) 3.1.0 even before 3.0.0 is out so I fixed this in the most non-intrusive way: I overloaded PlatformUtils::Initialize() function which now takes the three parameters corresponding to the three global k* variables. The fix is in SVN.

Scott and George: it would be a really good idea for you to grab a copy from SVN and test this feature to make sure it meets your requirement. I am working on the final release now so you only have a few days for this.


> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621298#action_12621298 ] 

David Bertoni commented on XERCESC-1821:
----------------------------------------

Hi George,

I already have a patch ready for this, so you don't need to worry about working on it any longer.  It will be ready for 3.1, and I'll check it in once we've released 3.0.

> 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


[jira] Resolved: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1821.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0

You can change the value using 

void DOMDocumentImpl::setMemoryAllocationBlockSize(XMLSize_t size)

However, as some allocations are done in the constructor, the first allocated block will always be 16Kb.

> 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
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> 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


[jira] Commented: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "Scott Cantor (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631526#action_12631526 ] 

Scott Cantor commented on XERCESC-1821:
---------------------------------------

Tests fine on Linux with an RPM build, except for a problem because of the addition of the .pc file. See my comment here:

https://issues.apache.org/jira/browse/XERCESC-1824

Otherwise looks great, thanks.


> 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: Boris Kolpackov
>            Priority: Minor
>             Fix For: 3.0.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


[jira] Updated: (XERCESC-1821) Configurable kInitialHeapAllocSize in xerces

Posted by "george (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

george updated XERCESC-1821:
----------------------------

    Description: 
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


  was:
The default  DOM initial heap size is 64k (


static XMLSize_t kInitialHeapAllocSize =  0x4000;
static XMLSize_t kMaxHeapAllocSize     =  0x20000;
static XMLSize_t kMaxSubAllocationSize =  0x1000;  // Any request for more bytes



> 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
>            Priority: Minor
>
> 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