Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
AddEdge
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Massoud77@gmail.com  
View profile  
 More options May 29, 10:12 am
From: "Massou...@gmail.com" <Massou...@gmail.com>
Date: Fri, 29 May 2009 07:12:20 -0700 (PDT)
Local: Fri, May 29 2009 10:12 am
Subject: AddEdge
Hello,
I have written a script for adding edges manually:

def createEdges(node_src, destinations):
        node1 = eval( 'v' + str(node_src) )
        n = len(destinations)
        for i in range(n):
                node2 = eval( 'v' +str(destinations[i]) )
                try:
                        addEdge(node1,node2)
                except:
                        a=None

Does anyone know why it is much slower than adding edges using a GDF
file?
Does addEdge() do some verifications ?

Thanks,
Massoud


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eytan Adar  
View profile  
 More options May 29, 12:06 pm
From: Eytan Adar <eytana...@gmail.com>
Date: Fri, 29 May 2009 09:06:01 -0700
Local: Fri, May 29 2009 12:06 pm
Subject: Re: AddEdge

It's the difference between batch LOAD operation, and many small SAVE
operations.  When you load the GDF file it only has to instantiate the
objects in memory and can do those pretty quickly.  Whenever you create an
edge it saves the edge to the database, and then sets all the attributes
(requiring a save on each one).  I'm not sure I can offer a workaround that
would make any real difference in the end... there are tricks to delay the
database commit stage which might make it a tiny bit faster.

-Eytan

On Fri, May 29, 2009 at 7:12 AM, Massou...@gmail.com <Massou...@gmail.com>wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Massoud SEIFI  
View profile  
 More options May 29, 4:31 pm
From: Massoud SEIFI <massou...@gmail.com>
Date: Fri, 29 May 2009 22:31:41 +0200
Local: Fri, May 29 2009 4:31 pm
Subject: Re: AddEdge

Thank you Eytan for your fast reply.

Is there any way to do a batch LOAD operation using a script?
I couldn't find the source code of makeFromGDF() function to find out how it
works.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eytan Adar  
View profile  
 More options Jun 1, 6:10 pm
From: Eytan Adar <eytana...@gmail.com>
Date: Mon, 1 Jun 2009 15:10:12 -0700
Local: Mon, Jun 1 2009 6:10 pm
Subject: Re: AddEdge

makeFromGDF uses more or less the same code as the bulk loader, so it should
work... I think it's in the com/hp/hpl/guess/io directory.

There's probably a better way to do this, but I'd need to think about it...

-Eytan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google