Re: [xml] about xmlThrDefDefaultBufferSize



In a message dated Wed, 23 Jun 2004 16:28:35 +0900,
 <veillard redhat com> wrote:

veillard>> The xml file size about 50Kbytes, but the system uses over 10 MByte 
veillard>> when read it.
veillard>
veillard>  This makes no sense to me. Reproduce this with xmllint and provide
veillard>the input generating this...
veillard>
thank you.  response to me.
yes. I found what's wrong.

I use program like as follows. (to convert words encoding to euc-jp 
or Shift_JIS)

//UTF8 -> Encoding
xmlBufferPtr UTF8ToENCODE(xmlBufferPtr src,xmlBufferPtr dist,const 
char *encoding) {
  xmlCharEncodingHandlerPtr pEncHandle;
  pEncHandle = xmlFindCharEncodingHandler(encoding);
  if(xmlCharEncOutFunc(pEncHandle,dist,src)>0) 
  return dist;  
  else 
  return src;
}

And, when i comment out this function from upper program, everything 
be normal.
when read 50KBytes xmlfile, the used memory increase about 500k !

So. I have another question.
What is wrong of that function 'UTF8ToENCODE' ?

thank you.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
MAIL : nakai kazuhiro sharp co jp
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/




_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
MAIL : nakai kazuhiro sharp co jp
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]