List Info

Thread: perfomance problem when adding file in big directory




perfomance problem when adding file in big directory
user name
2006-09-07 17:53:39
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-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org

Re: perfomance problem when adding file in big directory
country flaguser name
Iceland
2007-06-22 07:56:18
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-unsubscribejakarta.apache.org
> For additional commands, e-mail: slide-user-helpjakarta.apache.org
>


------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )