Why are file compares so much slower in BC3?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Xtraeme
    Enthusiast
    • May 2008
    • 34

    Why are file compares so much slower in BC3?

    I have a rather large vcproj (2.2 MBs) that I'm diffing and in BC2 it goes from beginning to end in less than 3 to 5s. But in BC3 (build 462) it takes on average 1m 55s! I'm not doing anything special to the file - it's diffing with <default>.

    What gives?
  • ron
    Fanatic
    • Dec 2007
    • 123

    #2
    Check your session rule settings (the referee on the toolbar), sounds like one's doing a compare contents and the other isn't.

    Comment

    • JimF
      Enthusiast
      • Apr 2008
      • 31

      #3
      What version of BC3 did you download? From the download page:
      The Full Debug build includes additional debug code to help us track down obscure crashes and memory leaks. It is noticably slower than the regular release, and never frees memory, so if you let it run long enough it will run out of memory. The Optimized build uses the final release configuration. You can use it for more precise performance measurements, but we prefer that you use one of the debug builds in general.
      So, if you are running "Full Debug", you may want to try "Normal Debug". If you are running "Normal Debug", you can try "Optimized".

      Jim

      Comment

      • Xtraeme
        Enthusiast
        • May 2008
        • 34

        #4
        @Ron,

        Looking in Specs, Format, Importance, Alignment and Replacements I see nothing out of the ordinary. Is there something in particular I should be looking for?

        And for the record I just set the Alignment->Standard Method to a skew tolerance of 800 (all the way to the left at 'Fast and Coarse') and that's taking 1m 45s.
        Last edited by Xtraeme; 16-Jul-2008, 02:17 PM.

        Comment

        • Xtraeme
          Enthusiast
          • May 2008
          • 34

          #5
          Good theory Jim, but even with the optimized 462 build it still takes on average 1m 53s.

          Something's very wrong...

          Comment

          • Xtraeme
            Enthusiast
            • May 2008
            • 34

            #6
            Running ProcMon it looks like BC3 is reading in the temp file from %USERPROFILE%\local settings\temp in 16K chunks, diffing, and then calling back out to disk.

            What's the point of this tmp file? In BC2 it just used the left and right files and did in an in-memory compare.

            Comment

            • ron
              Fanatic
              • Dec 2007
              • 123

              #7
              In BC3, check the Comparison tab on the Session Settings dialog.

              Compare that to Session/Comparison Control/General in BC2.

              Comment

              • ron
                Fanatic
                • Dec 2007
                • 123

                #8
                Well, there is a difference but I'm not seeing the same magnitude you are.

                Comparing different releases of my VC projects consisting of 14.4Mb in 878 *.cpp;*.hpp;*.c;*.h files and using Rules Based Comparison...

                BC2 is right at 5 (1001, 1002 method) seconds and BC3 = "Successfully compared 878 items. Completed in 15.63 seconds."

                So technically it is 3 times slower - on my machine.

                I ran each test multiple times to help reduce the impact of caching on the results.

                Comment

                • Xtraeme
                  Enthusiast
                  • May 2008
                  • 34

                  #9
                  @ron ... clicking on the referree in BC3 I don't see any tabs labelled session or comparison. The popup box is called Session Settings, but the tabs are simply:

                  Specs, Format, Importance, Alignment, and Replacements.

                  In BC2 the closest thing I can find is Ref->File Comparison Rules->General which allows me to see Tabs and Spaces, maximum line length, character set, important / unimportant text, alignment, conversion, etc.

                  The values between BC3 and BC2 are pretty much identical.

                  Comment

                  • Zoë
                    Team Scooter
                    • Oct 2007
                    • 2666

                    #10
                    Xtraeme,

                    When you say you have a large vcproj, you're referring specifically to a single .vcproj file that you're comparing in the text compare, aren't you? Is there any chance you can send it to [email protected] so we can compare it ourselves?
                    Zoë P Scooter Software

                    Comment

                    • Xtraeme
                      Enthusiast
                      • May 2008
                      • 34

                      #11
                      Craig, it's not specific to any one file, it's based simply on file size. For instance I just downloaded a copy of The World English Bible (http://www.gutenberg.org/dirs/etext05/web6710.txt), (it's ~4MBs) and made an edit at the 25%, 50%, and 75% mark. It took 1m 30s to complete the diff in BC3 while in BC2 it took less than 2 seconds.

                      Comment

                      • Zoë
                        Team Scooter
                        • Oct 2007
                        • 2666

                        #12
                        Oh, BTW, the temp file is used when the file is large enough that we don't keep it all in memory (I think 16K lines). In BC2 we just kept the original file locked while it was open in the viewer; in BC3 we make a copy of the original file and keep it locked instead. I think it's also used for undo-after-save support.
                        Zoë P Scooter Software

                        Comment

                        • Xtraeme
                          Enthusiast
                          • May 2008
                          • 34

                          #13
                          I like the no file lock. In the past I just wanted to have two version of BC2 open. One diffing file a.txt and file b.txt. Then another window diffing b.txt and c.txt. Then my plan between the two was to make a modification to b.txt in the first and then alt+tab over to the other, import the changes, and make additional edits based off that diff.

                          3-way merge in some scenarios is overkill not to mention it's hard to line things up properly when diffing 3 ways. It's much easier to do manual aligns with two text windows.

                          That said it should really be an option. I've had scenarios where I've had to diff very large logs (several hundred megs) and I had no plans whatsoever to edit those files. So I'd have no need for the backup. In that scenario the right thing to do is load them in as memory mapped files, store the differences in memory (or if necessary dump them to disk somewhere), and then call out to the original file to get the original text.

                          Comment

                          • Zoë
                            Team Scooter
                            • Oct 2007
                            • 2666

                            #14
                            Looks like we messed something up in the latest build. I can reproduce what you're seeing here and it doesn't occur in 461. Should be easy to fix.
                            Zoë P Scooter Software

                            Comment

                            • Xtraeme
                              Enthusiast
                              • May 2008
                              • 34

                              #15
                              Awesome - thanks Craig . I had to revert back to BC2 and that was kind of annoying me.

                              Comment

                              Working...