how to reduce loading time ?

Discussion in 'Questions (Windows Mobile)' started by gjoisa, Apr 1, 2008.

  1. gjoisa

    gjoisa Active Member Licensed User

    I am creating an application which takes about 40 to 50 seconds to load after tapping the icon in my ppc ( i-mate) . I have about 100 global variables in my application. How to reduce the loading time ?:sign0085:
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Using DoEvents will further slow the loading time but at least the Form will be shown and depending what it is your doing you maybe able to start using your app whilst the rest of the program loads. It's unlikely that the variables are slowing the load time if you only have 100.
    Do you have a lot of controls?

    Alternatively, you could just display a splash screen (Autocad Inventor takes an eternity to load but at least it has a nice splash screen :))

  3. Erel

    Erel Administrator Staff Member Licensed User

    Did you use the optimized compiler option?
    Can you give some more information about your program? Especially what it does at startup.
  4. gjoisa

    gjoisa Active Member Licensed User

    Sub Globals
    'Declare the global variables here.
    Dim a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q
    Dim ti,ladir,lodir,pg,ab,ac,dw,dob,tim,tz,rv,rv1,ch,kj,bd,gr,sk,sn,rh,kt
    Dim md,ksh,kldn,ayn,pmean,gati,dhrv,much,mk,chy,mkr,pmkr,mph,la,lo,kld,pl
    Dim pl1,kr1,kr2,dsm,sr,ss,lg,rmph,rdms,srt,dp,baldasa,bada,thi,nak,yog,kar
    Dim bdyy,bdmm,bddd,ra,bh,kl,vk,gn,chbh,bhsa,bh2,bh3,bh4,bh5,bh6,bh7,bh8,bh9
    Dim bh10,bh11,bh12,sbh1,sbh2,sbh3,sbh4,sbh5,sbh6,sbh7,sbh8,sbh9,sbh10,sbh11
    Dim sbh12,r(13),s(13),asd(13),pn,fkey
    Dim da,x,y,z,th,chm,cht,rvm,rmk,rkr,an,plio,smkrn,sgk,prv,lln,vksh
    Dim d1,d2,d3,d4,d5,d6,d7,d8,d9
    Dim me(9),vr(9),mi(9),kr(9),si(9),kn(9),tu(9),vc(9),dh(9),mr(9),ku(9),mn(9)
    Dim r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12

    Dim aday,aaday,ddob,dsdd,dsmm,dsyy,ded,gdasa,mdasa,n1,i1,temp,tempe,rasi,rasiv,baka,lord
    End Sub

    Sub App_Start
    con.Open("Data Source=" & AppPath &"\Atlas.sl3"):
    Text="Create Table If Not Exists NameTable(Field1 Text , Field2 Text , Field3 Text , Field4 text , Field5 text , field6 text , field7 text , Field8 text , Field9 Text)"


    End Sub

    This is the code written by me before loading the main form . What may be the problem here ?
  5. Erel

    Erel Administrator Staff Member Licensed User

    Do you have enough memory available? Loading the SQL library can affect the performance if your device is low on memory.
    Did you try to soft reset the device and then run the program?