Skip to content

Commit

Permalink
[ 1805644 ] sfcb http performance needs improvement
Browse files Browse the repository at this point in the history
Avoiding superfluous memory operations.
  • Loading branch information
mihajlov committed Oct 2, 2007
1 parent b7a00af commit f1bcd43
Show file tree
Hide file tree
Showing 26 changed files with 338 additions and 299 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,3 +1,13 @@
2007-10-02 Viktor Mihajlovski <mihajlov@dyn-9-152-210-67.boeblingen.de.ibm.com>

* args.c,array.c,brokerEnc.c,brokerUpc.c,cimXmlGen.c,cimXmlGen.h,
cimXmlRequest.c,constClass.c,context.c,datetime.c,httpAdapter.c,
instance.c,internalProvider.c,Status:,interopProvider.c,native.h,
objectImpl.c,objectpath.c,predicate.c,qualifier.c,qualifierProvider.c,
selectexp.c,string.c,support.c,utilft.h:
Fixed 1805644: HTTP Adapter Performance Improvements. Avoid useless
string length measurements and double copies.

2007-10-02 Sven Schuetz <sven@de.ibm.com>

* cimXmlGen.c, cimXmlParser.c:
Expand Down
14 changes: 10 additions & 4 deletions NEWS
Expand Up @@ -7,9 +7,17 @@ New features:

Bugs fixed:
- 1793223 Fixed cross-built ClProperty size mismatch
- 1744540 Fixed createClass segfault in classProviderMem
- 1764101 Fixed segfault in constClass::getPropQualifierAt()
- 1685254 Fixed sfcb does not return REFERENCECLASS in GetClass
- 1784913 Fixed change filter handling

Changes in 1.2.4
================

Bugs fixed:
- 1743692 Fixed sfcb does not return OBJECTPATHEs for associatorNames
- 1745103 Fixed bad key property when addKey done with type CMPI_chars
- 1744540 Fixed createClass segfault in classProviderMem
- 1725493 Fixed 401 send twice
- 1746771 Fixed Memory leak in classProviderGz.c - in gatherNameSpaces()
- 1748392 Fixed associations in interop namespace might not work
Expand All @@ -19,14 +27,12 @@ Bugs fixed:
- 1754811 Fixed sfcb misses refences/referenceNames call in certain upcalls
- 1763178 Fixed GetClass operation failure
- 1746659 Fixed SFCB segfaults when ai commands are issued simultaneously
- 1764101 Fixed segfault in constClass::getPropQualifierAt()
- 1685254 Fixed sfcb does not return REFERENCECLASS in GetClass
- 1766770 Fixed sfcb segfaults when property list is specified w. references
- 1780595 Fixed xml special chars are not escaped in error description
- 1770841 Fixed one provider for multiple associations problem
- 1784913 Fixed change filter handling
- 1769471 Fixed multiple handlers do not work as expected
- 1791690 Fixed segfault with local call in newCMPIString
- 1805644 Enhanced HTTP adapter performance
- 1759083 Fixed sfcb cannot handle the embeddedobject attribute

Changes in 1.2.3
Expand Down
9 changes: 4 additions & 5 deletions args.c
@@ -1,6 +1,6 @@

/*
* $Id: args.c,v 1.11 2007/03/16 19:57:56 mihajlov Exp $
* $Id: args.c,v 1.12 2007/10/02 09:02:11 mihajlov Exp $
*
* © Copyright IBM Corp. 2005, 2007
*
Expand Down Expand Up @@ -132,7 +132,7 @@ static CMPIData __aft_getArgAt(const CMPIArgs * args,
return rv;
}
if (rv.type == CMPI_chars) {
rv.value.string = sfcb_native_new_CMPIString(rv.value.chars, NULL);
rv.value.string = sfcb_native_new_CMPIString(rv.value.chars, NULL, 0);
rv.type = CMPI_string;
}
else if (rv.type == CMPI_ref) {
Expand All @@ -145,8 +145,7 @@ static CMPIData __aft_getArgAt(const CMPIArgs * args,
native_make_CMPIArray((CMPIData *) rv.value.array, NULL, &ca->hdr);
}
if (name) {
*name = sfcb_native_new_CMPIString(n, NULL);
free(n);
*name = sfcb_native_new_CMPIString(n, NULL, 0);
}
if (rc)
CMSetStatus(rc, CMPI_RC_OK);
Expand Down Expand Up @@ -260,7 +259,7 @@ MsgSegment setArgsMsgSegment(CMPIArgs * args)
CMPIString *args2String(CMPIArgs * arg, CMPIStatus * rc)
{
char * argstr = ClArgsToString((ClArgs*)arg->hdl);
return sfcb_native_new_CMPIString(argstr, NULL);
return sfcb_native_new_CMPIString(argstr, NULL, 0);
}


Expand Down
6 changes: 3 additions & 3 deletions array.c
@@ -1,6 +1,6 @@

/*
* $Id: array.c,v 1.16 2007/05/31 12:16:59 sschuetz Exp $
* $Id: array.c,v 1.17 2007/10/02 09:02:11 mihajlov Exp $
*
* © Copyright IBM Corp. 2005, 2007
*
Expand Down Expand Up @@ -153,7 +153,7 @@ static CMPIStatus setElementAt ( CMPIArray * array, CMPICount index, const CMPIV

if ( type == CMPI_chars && a->type == CMPI_string ) {
if (val) {
v.string = sfcb_native_new_CMPIString ( (char *) val, NULL );
v.string = sfcb_native_new_CMPIString ( (char *) val, NULL, 0 );
type = CMPI_string;
val = &v;
} else {
Expand Down Expand Up @@ -219,7 +219,7 @@ CMPIStatus arraySetElementNotTrackedAt(CMPIArray * array,
CMPIValue v;

if (type == CMPI_chars && a->type == CMPI_string) {
v.string = sfcb_native_new_CMPIString((char *) val, NULL);
v.string = sfcb_native_new_CMPIString((char *) val, NULL, 0);
type = CMPI_string;
val = &v;
}
Expand Down
2 changes: 1 addition & 1 deletion brokerEnc.c
Expand Up @@ -70,7 +70,7 @@ static CMPIString *__beft_newString(const CMPIBroker * broker,
const char *str, CMPIStatus * rc)
{
_SFCB_ENTER(TRACE_ENCCALLS,"newString");
CMPIString *s=sfcb_native_new_CMPIString(str, rc);
CMPIString *s=sfcb_native_new_CMPIString(str, rc, 0);
_SFCB_RETURN(s);
}

Expand Down
6 changes: 3 additions & 3 deletions brokerUpc.c
@@ -1,5 +1,5 @@
/*
* $Id: brokerUpc.c,v 1.24 2007/09/06 13:54:25 sschuetz Exp $
* $Id: brokerUpc.c,v 1.25 2007/10/02 09:02:11 mihajlov Exp $
*
* © Copyright IBM Corp. 2005, 2007
*
Expand Down Expand Up @@ -162,7 +162,7 @@ static void buildStatus(BinResponseHdr *resp, CMPIStatus *st)
if (st==NULL) return;
st->rc=resp->rc;
if (resp->rc && resp->count==1 && resp->object[0].type==MSG_SEG_CHARS && resp->object[0].length) {
st->msg=sfcb_native_new_CMPIString((char*)resp->object[0].data,NULL);
st->msg=sfcb_native_new_CMPIString((char*)resp->object[0].data,NULL, 0);
}
else st->msg=NULL;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ static CMPIStatus setErrorStatus(int code)
msg = m;
}
st.rc = code;
st.msg = sfcb_native_new_CMPIString(msg, NULL);
st.msg = sfcb_native_new_CMPIString(msg, NULL, 0);
return st;
}

Expand Down

0 comments on commit f1bcd43

Please sign in to comment.