Does CorelDRAW 2020 have any new optimization features?

Hello all, it's been quite a while.

At my workplace we have been using CorelDRAW 2018 with several complex custom-built  VBA macros made by me. This involves nesting, object manipulation, large scale duplication and several other things that tend to take quite while.

I remember seeing somewhere on the website that the performance in 2020 has been drastically improved and decided to put it to a test. Just making a simple macro where 10000 objects are created and then rotated.

Pure creation was about 5 times faster and creation, then rotation about 2 times faster. Of course, I used this excellent optimization advice from GDG_John.

Now my question is - does the 2020 version have any other optimization tools for VBA macros?

Parents
  • Alright, so... Based on this early testing I started implementing a more complex macro into 2020 and at the beginning everything seemed nice and efficient. I kept adding more operations, mostly lots of shape movement... I test the macro and it takes about 30 seconds for some fairly complex movement activities. Well, sounds decent, let's test it in 2018 just for fun... 3 seconds!?

    So it turns out 2020 is faster at almost anything (that is why I have object creation and Contours - at first it was twice as fast as 2018), but gets slower and slower the more object movement is done.

    I could not use VirtualShapes, because they do not support Contours, which I need. Anyone care to try this demo code I made (the real one has more movement and the difference exponentially grows)? Thanks!

    Private Sub SpeedTest()
    
        Optimize True
    
        Dim S As Shape, A As Shape
        
        Dim X As Byte, Y As Byte, P As Byte
        
        Dim T As Single
        
        Dim E As Effect
        
        T = Timer
        
        Dim Doc As Document
        Set Doc = CreateDocument
    
        For X = 1 To 20
        
            For Y = 1 To 20
            
                Set S = ActiveLayer.CreatePolygon2(X, Y, 1, Y Mod 5 + 3)
                Set E = S.CreateContour(cdrContourOutside, 0.5)
                Set A = E.Separate.Shapes.First
                A.ConvertToCurves
                
                For P = 1 To 10
                    A.Move 1, 1
                Next P
            
            Next Y
        
        Next X
        
        Optimize False
        
        MsgBox Timer - T
    End Sub
    
    Sub Optimize(Use As Boolean)
        If Use Then
            EventsEnabled = False
            Optimization = True
            ActiveDocument.SaveSettings
        Else
            ActiveDocument.RestoreSettings
            EventsEnabled = True
            Optimization = False
            ActiveWindow.Refresh
        End If
    End Sub
    
Reply Children