You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Maksimenko Alexander <al...@softwarium.net> on 2006/09/07 19:53:39 UTC
perfomance problem when adding file in big directory
Hi!
I stuck in the following problem -
One of my directories has 2000 files stored in it
while adding file in this directory Slide adds this file as a child of
the directory and updates it
StructureImpl.class line 344 :
public void create(SlideToken token, ObjectNode object,
String strUri)
parentObject =
parentUri.getStore().retrieveObject(parentUri);
.....
parentObject.addChild(newObject);
store(token, parentObject, true);
But while storing parent directory StandardRDBMSAdapter (line 136)
clears all its bindings and adds them again :
// update binding...
try {
clearBinding(connection, uri);
} catch (ObjectNotFoundException e1) {
// clear only if it existed
}
Enumeration bindings = object.enumerateBindings();
while (bindings.hasMoreElements()) {
ObjectNode.Binding binding = (ObjectNode.Binding)
bindings.nextElement();
try {
statement =
connection.prepareStatement(
"insert into BINDING (URI_ID, NAME,
CHILD_UURI_ID) select ?, ?, URI_ID from URI where URI_STRING = ?");
So when I add one file in this directory Slide does 2000 jdbc calls -
and it causes very serious perfomance problems
Why Slide clears all bindings when just updating?
Is there some workarounds for this problem?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Fwd: perfomance problem when adding file in big directory, StandardRDBMSAdapter unusable?
Posted by Eirikur Hrafnsson <ei...@idega.is>.
Forwarding this problem to the developer list in hopes for a response.
StandardRDBMSAdapter is clearing ALL bindings on one file update
which makes it unusable with large folders.
Can anyone explain why?
See details below:
> Subject: Re: perfomance problem when adding file in big directory
>
> Hi we have just realised we have the same problem and are getting
> timeouts on uploading a single file because it updates every single
> thing in the database!
> And we even have the binding set to false in slide.properties!
>
> Did anyone find a solution to this?
>
> -Eiki
>
> On Sep 7, 2006, at 5:53 PM, Maksimenko Alexander wrote:
>
>> Hi!
>> I stuck in the following problem -
>> One of my directories has 2000 files stored in it
>> while adding file in this directory Slide adds this file as a
>> child of the directory and updates it
>>
>> StructureImpl.class line 344 :
>>
>> public void create(SlideToken token, ObjectNode object,
>> String strUri)
>>
>>
>> parentObject = parentUri.getStore
>> ().retrieveObject(parentUri); .....
>> parentObject.addChild(newObject);
>> store(token, parentObject, true);
>>
>>
>>
>> But while storing parent directory StandardRDBMSAdapter (line 136)
>> clears all its bindings and adds them again :
>>
>> // update binding...
>>
>> try {
>> clearBinding(connection, uri);
>> } catch (ObjectNotFoundException e1) {
>> // clear only if it existed
>> }
>> Enumeration bindings =
>> object.enumerateBindings();
>> while (bindings.hasMoreElements()) {
>> ObjectNode.Binding binding = (ObjectNode.Binding)
>> bindings.nextElement();
>> try {
>> statement =
>> connection.prepareStatement(
>> "insert into BINDING (URI_ID, NAME,
>> CHILD_UURI_ID) select ?, ?, URI_ID from URI where URI_STRING = ?");
>>
>>
>>
>> So when I add one file in this directory Slide does 2000 jdbc
>> calls - and it causes very serious perfomance problems
>>
>> Why Slide clears all bindings when just updating?
>> Is there some workarounds for this problem?
>>
>> Thanks!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>
Re: perfomance problem when adding file in big directory
Posted by Eirikur Hrafnsson <ei...@idega.is>.
Hi we have just realised we have the same problem and are getting
timeouts on uploading a single file because it updates every single
thing in the database!
And we even have the binding set to false in slide.properties!
Did anyone find a solution to this?
-Eiki
On Sep 7, 2006, at 5:53 PM, Maksimenko Alexander wrote:
> Hi!
> I stuck in the following problem -
> One of my directories has 2000 files stored in it
> while adding file in this directory Slide adds this file as a child
> of the directory and updates it
>
> StructureImpl.class line 344 :
>
> public void create(SlideToken token, ObjectNode object,
> String strUri)
>
>
> parentObject = parentUri.getStore
> ().retrieveObject(parentUri); .....
> parentObject.addChild(newObject);
> store(token, parentObject, true);
>
>
>
> But while storing parent directory StandardRDBMSAdapter (line 136)
> clears all its bindings and adds them again :
>
> // update binding...
>
> try {
> clearBinding(connection, uri);
> } catch (ObjectNotFoundException e1) {
> // clear only if it existed
> }
> Enumeration bindings = object.enumerateBindings
> ();
> while (bindings.hasMoreElements()) {
> ObjectNode.Binding binding = (ObjectNode.Binding)
> bindings.nextElement();
> try {
> statement =
> connection.prepareStatement(
> "insert into BINDING (URI_ID, NAME,
> CHILD_UURI_ID) select ?, ?, URI_ID from URI where URI_STRING = ?");
>
>
>
> So when I add one file in this directory Slide does 2000 jdbc
> calls - and it causes very serious perfomance problems
>
> Why Slide clears all bindings when just updating?
> Is there some workarounds for this problem?
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org