Hi Pawan, What type of connection do you use? If you use remote, you can try to use plocal for migration and then plug the database to server. plocal doesn't use network communication and doesn't serialize/deserialize object all the time. This type of connection might fit better for the migration.
Another operation that might be consuming is asking database something in loop. Like at OrientDBServiceImpl.java:1307. getUserByFacebookId is called in loop and get from index performed every iteration. It would be much performant to use com.orientechnologies.orient.core.index.OIndex#iterateEntries It perform a single operation to fetch all entries. It is hard to analyze the whole program as soon as there is a lot of code and it requires too much time. Could you tell what parts is the most resource consuming? You provided timing, but I don't understand what part of code is responsible for each item. Best regards, Artem Orobets * Orient Technologiesthe Company behind OrientDB* 2014-05-26 10:05 GMT+03:00 Pawan Goyal <[email protected]>: > Thanks Lvc, > > I have made the change you have suggest still its taking 6-7 seconds.it add > 1700 edges and 570 vertex. > > Please Help me , other wise i have to migrate to Titan. > > > Below are detail logs. > > Total time adding addCompaniesVertex: 88 > Total time adding addWorkRelationship: 256 > total friends384 > Total time adding friends vertex and edge: 1766 > Total time adding addCompaniesVertex: 394 > Total time adding addWorkRelationship: 2973 > Total time adding company and employee edge: 3810 > Total time: 1034443849 6061 > > I am reattaching the code file again ,please review and suggest so that we > can further improve. > > On Thursday, 22 May 2014 17:47:50 UTC+5:30, Pawan Goyal wrote: > >> I am trying to store a facebook user data into orientDB .its taking 10-15 >> seconds for user for >> >> storing user,his friends and friends company into orientDB. >> >> Sample code is given below >> >> public void testMigration() throws Exception { >> long t1 = System.currentTimeMillis(); >> int j=0; >> DBObject dbObject=mongoDao.getUserProfileByProfileID("1034443849", >> "jbz"); >> long t2 = System.currentTimeMillis(); >> final String pid = (String) dbObject.get("pid"); >> final String apc = (String) dbObject.get("apc"); >> logger.info("pid=" + pid + " apc=" + apc + "===== " >> + j++); >> logger.info("[OPT]starting to handleNetworkUpdate(async)..." >> ); >> try { >> >> networkDiscoveryFacade.addFacebookUserDataIntoGraphDb >> (pid, >> apc); >> logger.info("[OPT]addFacebookUserDataIntoGraphDb done"); >> networkDiscoveryFacade >> .addFacebookUserFriendsDataIntoGraphDb(pid); >> logger.info("[OPT]addFacebookUserFriendsDataIntoGraphDb >> done"); >> //mongoDao.updateProfileMigrationStatus(pid, apc, "1"); >> System.out.println("Total time: " +pid +" "+ >> (System.currentTimeMillis() - t2)); >> logger.info("[OPT]updateProfileMigrationStatus done"); >> } catch (Exception e) { >> // TODO Auto-generated catch block >> e.printStackTrace(); >> } >> logger.info("[OPT]returning from >> handleNetworkUpdate(async)..."); >> >> System.out.println("Total time: " + (System.currentTimeMillis() - >> t1)); >> System.out.println("done"); >> >> i have attached the code. >> >> >> >> >> >> } >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
