Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Variables going out of scope and performance

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    263

    Variables going out of scope and performance

    Hi Guys

    We have experienced an issue with App Center Beta 9 where global variables, defined as PUBLIC in the app INIT() work fine in development but go out of scope (vanish) when deployed and used in the App Center.

    When we save to mem file & look at the contents, the memvars from the currently executing prg are there but the previously defined memvars have gone. Understandably this causes an error.

    The memvars are not being redefined or released. Any thoughts?

    Also, we are coming across performance issues when (normally at page change), Lianja App Center just seems to freeze (windows reports not responding) and then 10-15 seconds later it wakes up again and carries on. No error, just freezing.

    We are trying to find out where it is freezing - we suspect it is at save.

    Any comments would be much appreciated. Downloading Beta 10 now, hoping that may help.

    Cheers

    SpringBox

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,174
    I will look into the RESTORE FROM .mem file -- probably to do with runtime not having compilation enabled anymore.

    "We are trying to find out where it is freezing - we suspect it is at save."... Can you explain what you mean "at save".


    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,174
    Sorry I misread the post, Did that issue with public variables occur in v1.1beta8?

    i will need to have a zipped up copy if your app and data to investigate the issue you mention re changing pages. Please email to support.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Senior Member
    Join Date
    Jan 2014
    Posts
    263
    Hi Barry

    It was v1.1 Beta 9

    When a user navigates away from multi section page where each section is in editmode, we call a prg which saves each section in turn - eg :

    Lianja.showDocument("page:Page1Name.section1?actio n=save")
    Lianja.showDocument("page:Page1Name.section2?actio n=save")
    Lianja.showDocument("page:Page1Name.section3?actio n=save")
    Lianja.showDocument("page:Page1Name.section4?actio n=save")

    ** then put the next page in to edit mode

    Lianja.showDocument("page:Page2Name.section1?actio n=editmode")
    Lianja.showDocument("page:Page2Name.section2?actio n=editmode")
    Lianja.showDocument("page:Page2Name.section3?actio n=editmode")
    Lianja.showDocument("page:Page2Name.section4?actio n=editmode")

    Lianja.Get("Page2Name").Refresh()

    ** then display page

    showdocument("page:Page2?action=show") && switch to next page

    As you can see we haven't worked out how to use the "Full Page edit" property on the pages or how to call it & we don't understand what the "primary section " is. Maybe we could get a performance increase by using this?

    Hope that clarifies.

    Cheers

    SpringBox

  5. #5
    Senior Member
    Join Date
    Jan 2014
    Posts
    263
    Hi Barry

    We put a <save to memfilename> in our code purely so that on the APP center, we could capture what was going on & confirm that the previously declared PUBLIC variables were missing.

    Will try it on Beta 10 & see if that makes any difference.

    Thanks

    SpringBox

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,174
    There were changes made in beta9 where the app init, load and ready procs need to be in a custom library.

    Try recreating your init delegate and placing the code you had in it. This will be the issue.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,174
    Ok that's the issue as a save operation in full page edit will call save on all sections in that page now.

    just set the full page edit attribute on the page and remove those calls you make to save each section. You don't need to do that anymore. Just save the top section and all will be saved.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Senior Member
    Join Date
    Jan 2014
    Posts
    263
    Hi Barry

    Thanks - both of those 2 make sense. Will try the app center in a bit.

    If we have Full page edit AND Refresh when activated both ticked, is it still sensible to call our (albeit now just the top section each time) EDIT function on Page.Activate and our SAVE function on Page.Deactivate or are we going to be "treading on our own feet"?

    Thanks

    SpringBox

  9. #9
    Senior Member
    Join Date
    Jan 2014
    Posts
    263
    Hi Barry

    Cant't get that to work & selecting Full page edit often crashes Lianja.

    With Full page edit selected, when we editmode the top section only the top section is set to editmode, the other sections are unaffected.

    Lianja.showDocument("page:PageName.TopSectionName? action=editmode")


    Issuing a save (now of just the top section)
    Lianja.showDocument("page:PageName.TopSectionName? action=save")

    saves only the top section. We have reloaded the pages.

    Re performance - it seems to be the save.

    Page has 9 sections & 96 fields

    table has 2 records & 218 fields. Table is part of database. Table has 1 index.

    A save takes on average 24 seconds on a fast PC - there must be something wrong !!

    There is nothing going on other than a save. We are missing something.

    Hope this helps

    Cheers

    SpringBox

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,174
    There is a full page edit example in the distro and it works just fine, I explained about the save. So I need to take a look at your app and investigate what you are doing that is causing this behavior.

    You probably still have some legacy delegates in somewhere that are not playing well with full page edit and full page save across multiple sections.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Page 1 of 2 12 LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us