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)


> > 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 ?


Thread locked

Messages in this Thread

94,975 Postings in 11,969 Threads, 349 registered users, 34 users online (1 registered, 33 guests)
Index | Admin contact |   Forum Time: May 26, 2020 - 6:58 pm EDT  |  Hits:31,237,313  (6,030 Today )
RSS Feed