Announcement

Collapse
No announcement yet.

Registry dump, making use of order?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registry dump, making use of order?

    My comparison of two registry dumps takes ages and the automatic alignment is poor.
    I think that the reason is that BC2 is not making use of the fact that the keys are in order, so it is searching right through its skew range to find a matching line, usually failing.
    The default for registry dump comparison is that lines beginning and ending with square brackets are of high importance.
    What could be done additionally is to specify that I know that the file has them in order, which should be usable to short-cut the matching search.

    E.g.
    >>> File A:
    [HKEY_alpha]
    ...
    [HKEY_bravo]
    ...
    [HKEY_delta]
    ...
    [HKEY_golf]
    ...
    >>> FILE B:
    [HKEY_alpha]
    ...
    [HKEY_bravo]
    ...
    [HKEY_charlie]
    ...
    [HKEY_foxtrot]
    ...
    [HKEY_golf]
    ...
    >>> Desired action:
    1. compare first two keys OK
    2. compare [HKEY_delta] with [HKEY_charlie], no match and A > B, so:
    3. mark [HKEY_charlie] as unmatched
    4. compare [HKEY_delta] with [HKEY_foxtrot], no match and A < B, so:
    5. mark [HKEY_delta] as unmatched
    6. compare [HKEY_golf] with [HKEY_foxtrot], no match and B < A, so:
    7. mark [HKEY_foxtrot] as unmatched
    8. compare [HKEY_golf] with [HKEY_golf]

    This looks trivial with this example, but for a big registry dump it could bring a massive increase in speed. It would also apply to ordered lists of filenames.
    So how do I tell BC2 that the file is ordered?

  • #2
    Re: Registry dump, making use of order?

    Hi Charlie,

    To get at the alignment settings for a rule, select Tools|Edit Current Rules in the File Viewer. Go to the Alignment tab. The Skew Tolerance sets how far BC searches up and down in a file when trying to align. It doesn't always search to the maximum value, if it finds a good match it will stop earlier.

    Setting the skew tolerance lower might help. You can also try checking "Never align mismatches". This will prevent lines with partial matches from lining up.
    Chris K Scooter Software

    Comment


    • #3
      Re: Registry dump, making use of order?

      Hi Chris, Thanks for the reply. Yes, "Never align mismatches" does improve the comparison of my registry dumps, but I can't use it for my file lists, where what I want to say is "text after the first space character is unimportant for alignment but I need to see differences".

      Are there any plans to add to BC the ability for a user to specify that important lines (and parts of lines) are in order?
      I also wondered about a plug-in, but on downloading the sample it seems to say that plug-in operation is only supported for viewing, not for comparison, so I cannot write a plug-in to handle ordered files -- do I understand it right?

      Comment


      • #4
        Re: Registry dump, making use of order?

        It sounds like turning down the skew tolerance in the alignment settings, but leaving "Never Align Mismatches" unchecked is your best option.

        If you only want to align on part of a line, the best option currently is to use our Data Viewer plug-in.

        If the data viewer isn't an option for you, you can work around it by marking the text you want to align as a String Literal in the file comparison rules, and checking "All other text is unimportant". Then make sure View|Ignore Unimportant Differences is turned off.

        This should align on the text defined as a string literal, but differences outside the string literal will still show in blue.

        We're considering an alignment option to only align on part of a line for a future version of Beyond Compare.
        Chris K Scooter Software

        Comment

        Working...
        X