Re: [Pythoncad-developer] New testing kernel
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
From: <mat...@bo...> - 2010-02-19 13:21:46
|
Hi Gertwin, > The commit is very expensive for single updates. > Is it possible to let the program control the commit? Yes this is the code for the bulk operation .. kr=PyCadDbKernel() startTime=time.clock() nEnt=100 kr.startMassiveCreation() <-here i start bulkOperation for i in range(nEnt): basePoint=Point(10,i) kr.saveEntity(basePoint) kr.performCommit() <- here i perform the commit endTime=time.clock()-startTime In this case the commit was made at the end ..... So in case of dxf import we can use this strategy to speed up the load of the data. In this way no undo will be written ... so I have to think at something else to record the undo for all the entitys. May be I can create a relation table from undo end Entitys to link one undoId with more entitys. Regards, Matteo > > Also when the user wants to undo this action all modified > elements are undone, not a single element per undo. > > Regards, > Gertwin > > > Op 19 feb. 2010 12:33 schreef > "mat...@bo..." > > <mat...@bo...>: Hi Gertwin, > > > I Did some mistakes on time calculation > > > those are the updated values > > > > > > > Test made on w$7 os: > > > No Bulk Operation (with commit and undo enable) > > > Create n: 1 entity in : 0.1890149854s > > > Create n: 10 entity in : 1.0234820464s > > > Create n: 100 entity in : 10.5052122664s > > > > > BulkOperation (Commit at the end and undo disable) > > > Create n: 1 entity in : 0.193075697126s > > > Create n: 10 entity in : 0.190634392615s > > > Create n: 100 entity in : 0.196410349659s > > > Create n: 1000 entity in : 0.320889925233s > > > Create n: 10000 entity in : 1.33172048646s > > > Create n: 100000 entity in : 11.4102046186s > > > > > I don't think that we can have best performance ..than > this > > > . > > > > > Regards, > > > Matteo > > > > > ----- Original Message ----- > > > Da : "mat...@bo..." > > > mat...@bo...> > > > A : Matteo Boscolo > > > mat...@bo...>,ger...@gm... > > > Cc: pyt...@li... > > > Oggetto : Re: [Pythoncad-developer] New testing kernel > > > Data : Fri, 19 Feb 2010 10:36:41 +0100 > > > > > > I Gertwin, > > > > > > > > I have done some modification at the kernel structure > to > > > > improve the performance > > > > and here there is the test. > > > > > > > > We need to inprove the performance on the single > operation > > > > 0.4 for a single operation is too mutch... I think > that i > > > > can improve the code do get 0.0007 s > > > > for single entity > > > > > > > > Test made on w$7 os: > > > > Old style Performance test > > > > Create n: 1 entity in : 0.479778374389s > > > > Create n: 10 entity in : 4.9313876202s > > > > Create n: 100 entity in : 49.298951129s > > > > > > > > New style performance test > > > > Create n: 1 entity in : 0.000770127605866s > > > > Create n: 10 entity in : 0.00181878469585s > > > > Create n: 100 entity in : 0.0115031393396s > > > > Create n: 1000 entity in : 0.110898375245s > > > > Create n: 10000 entity in : 1.06068519964s > > > > Create n: 100000 entity in : 10.6621433079s > > > > > > > > Regards, > > > > Matteo > > > > > > > > ----- Original Message ----- > > > > Da : Matteo Boscolo mat...@bo...> > > > > A : ger...@gm... > > > > Cc: pyt...@li... > > > > Oggetto : Re: [Pythoncad-developer] New testing kernel > > > > Data : Wed, 17 Feb 2010 16:14:39 +0000 > > > > > > > > > Hi Gertwin, > > > > > I have done the first test on writing a pythoncad > point > > > > > in to the db structure. > > > > > It takes 0.25 s for one entity ... > > > > > > > > > > Suppose to have a dxf with 100000 entities ...it's > > > > > around 7 our on my dual core 2.4 GHz machine ... > > > > > > > > > > Could you please have a look at my code ..may be > I've > > > > > made some conceptual errors.. > > > > > > > > > > Now at each insert I perform a commit ... may be for > > > > > massive import this slow down the performance .. > > > > > We can think of something for massive operation... > that > > > > > make the commit at the end of the import and do not > > > > > write infos into the undo .. > > > > > > > > > > Let me know.. > > > > > > > > > > Regards > > > > > Matteo > > > > > > > > > > > > > > > 0.25*100000/60/60 > > > > > On Tue, 2010-02-16 at 22:15 +0000, > > > > > > ger...@gm... wrote: I started with > > > > > > commenting out all the old "Image class" related > code > > > > > > but the old "Image class" is used every where. I > will > > > > > > start with new interface code and only copy those > > > > > > parts that are needed from the old code. > > > > > > Regards, > > > > > > Gertwin > > > > > > > > > > > > > > > > > > Op schreef Matteo Boscolo > > > > > > > mat...@bo...>: > > > > > > > > > > > > > > > 2) Or I can start with a new main window + > > > > > > viewport for the test and > > > > > > > > > > > > > > > later copy the code that is needed from the > old > > > > > > > version into it. > > > > > > > > Maybe the second option is more efficient in > the > > > > > > > end. > > > > > > > I will take more than a week to have something > that > > > > > > > work properly to > > > > > > > make some test. > > > > > > > > > > > > > > so you cad think at the best way to write your > code. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Let me know... > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > Matteo > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Op schreef Matteo Boscolo > > > > > > > mat...@bo...>: > > > > > > > > > Hi Gertwin, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am going to adjust the existing > interface > > > > > > > (viewport) code to > > > > > > > > work > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > with your kernel module. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > After that we can do some performance > tests. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ok let me know when you have finish ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Why are there 2 database connections? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The first is made in PyCadDbKernel, the > second > > > > > > > is made in > > > > > > > > PyCadUndoDb. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have made some more modification that I > will > > > > > > commit tomorrow and > > > > > > > > > > > > > > > all > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > will be clear ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm changing costantly the kernel module to > > > > > > perform all the feature > > > > > > > > > > > > > > > that > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > we have discuss.. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If I have more questions during the > adjusting > > > > > > > the existing > > > > > > > > interface > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > code, I will post them in this thread. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thats good .. we need to find the best > solution > > > > > > for our product.. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Matteo > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Gertwin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Op schreef Matteo Boscolo > > > > > > > mat...@bo...>: > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi All, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Today I have committed the new testing > > > > > > > version of the kernel > > > > > > > > using > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sqlite db. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You can find it in the git unde > > > > > > > Generic\kernel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This is just a working model for doing > some > > > > > > > performance and > > > > > > > > feature > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > test. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If the test that we are gonna to do well > be > > > > > > good in performance > > > > > > > > > > > > > > > and > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > feature, we well introduce it under R38. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This new way to store the information on > a > > > > > > db will help us to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > improve > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > our solution with the following > capability: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 1) possibility to have the drawing with > all > > > > > > > the technical > > > > > > > > revisions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2) very easy to develop new feature > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 3) possibility to have a file stored in > an > > > > > > mysql db(distribute > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > enviroment) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 4) force access of some part of the > drawing > > > > > > > with group\user > > > > > > > > policy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |