Controling compression of cel file

Hi,
I have empty cell file.
I would like to create hundreds of cell in a loop.
After creating my cell element, I use AttachedCellLibrary.AddCell function in order to put newly created cell into .cel file.
Everything works fine until now.
My problem is evertime cell created and put into cel file, cell file is compressed for each loop.
In the beginning performance still ok.
but after creating hundreds of cell, compression makes performance slower

Is there any suggestion that I can control compression of cel file?
So that I let compression of cel file after 100 loops instead for each loop.

Kind Regards,
Olcay Ebcin
Parents
  • Loop Control

    oebcin said:
    Is there any suggestion that I can control compression of cel file? So that I let compression of cel file after 100 loops instead for each loop.

    I'm guessing at what your code might be, but I'm assuming there's a loop (i.e. For ... Next or Do ... Loop).

    Put a counter in your loop. When the counter reaches 100, call your compress procedure and reset the counter. Like this …

    Const nProcedureTrigger As Integer = 100
    Dim trigger As Integer
    trigger = 0
    ' Start making cells
    Do While makeCell
       ' Make cell
        …
       trigger = trigger + 1
       If nProcedureTrigger = trigger Then
          trigger = 0
          Call DoSomethingOccasionally
       End If
    Loop
    Sub DoSomethingOccasionally ()
       ' Compress or whatever
    End Sub

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • Loop Control

    oebcin said:
    Is there any suggestion that I can control compression of cel file? So that I let compression of cel file after 100 loops instead for each loop.

    I'm guessing at what your code might be, but I'm assuming there's a loop (i.e. For ... Next or Do ... Loop).

    Put a counter in your loop. When the counter reaches 100, call your compress procedure and reset the counter. Like this …

    Const nProcedureTrigger As Integer = 100
    Dim trigger As Integer
    trigger = 0
    ' Start making cells
    Do While makeCell
       ' Make cell
        …
       trigger = trigger + 1
       If nProcedureTrigger = trigger Then
          trigger = 0
          Call DoSomethingOccasionally
       End If
    Loop
    Sub DoSomethingOccasionally ()
       ' Compress or whatever
    End Sub

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children