ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] Multiple instance history merging   [ZEP]

By: Ben Kent       
Date: Apr 07,2019 at 06:01
In Response to: [ZEP] Multiple instance history merging (Peter Shute)

Peter

> > When you first posted I was intrigued, so I wrote a powershell
> script
>
> I didn't post that 2015 message.
I just assumed it was you ;-)

>
> > to merge ztw.hst files. But because the script ran slower than I
> would
> > like and I wasn't loosing config I didn't post the script. Recently
> I
> > have suffered a number of missing history list items so I had another
> > look, and then your re-post.
> > The performance is still not what I would like, on my home system the
> > merge takes 12 seconds.
>
> I assume it would be pretty quick with compiled code.
I have gone for ease of maintenance over speed, yes stepping over the three ordered lists in one pass in a compiled language should be a lot quicker.


> Did you try doing a simple combine and sort, then eliminating
> consecutive duplicates? I think Powershell can do sort | unique if I
> haven't misunderstood the commands. You'd lose the ordering of the
> histories though.

Just doing that would loose history ordering, I read the histories into arrays of objects, the objects include the original order. Then sort all, merge by type to improve efficiency, using the order property where needed. Then a sort of the output array removing items marked for deletion, ordering by type, then the order property, with a little bit of sort by expression to force zt= to be last.


Have you tested the script http://www.ztw3.com/upfile/mergeztreehistory.zip ?

Ben

152 views      
 

Messages in this Thread

 
94,477 Postings in 11,922 Threads, 348 registered users, 6 users online (0 registered, 6 guests)
Index | Admin contact |   Forum Time: Oct 17, 2019 - 11:34 pm EDT  |  Hits:28,770,021  (4,450 Today )
RSS Feed