PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Program Caching  (Read 315 times)

Lawrence_Leavell

  • Silver Member
  • ***
  • Posts: 35
    • View Profile
Program Caching
« on: April 15, 2019, 11:58:24 AM »
We have witnessed program caching on three systems, all Linux, using ProvidexPlus. We make a change to a program, SAVE it, then moments later we LOAD the same program and it is the PREVIOUS version, NOT containing the new changes.
We have turned off parameters 'CC', 'PC'=0, -'+C', all to no avail.
If we drop out of Providex and re-enter, we get the new version of the program, so it seems that Providex is causing the issue.
What are we missing?
Lawrence Leavell

EVa

  • Member
  • **
  • Posts: 18
    • View Profile
    • EDIAS
Re: Program Caching
« Reply #1 on: April 16, 2019, 03:23:24 AM »
Don't ADDR programs that you are going to edit ?

Peter.Higgins

  • Silver Member
  • ***
  • Posts: 37
    • View Profile
Re: Program Caching
« Reply #2 on: April 19, 2019, 08:22:17 AM »
Lawrence,

We see the same issue with editing objects, and some graphical programs.  It is not 100% but few can be edited in session after running.  Have eliminated the cache as well.  Appears that  the objects or programs are triggering a condition that locks them into memory.  For  instance on our progress bar objects, after running a report, I remember
the graphic animation object could be edited in session, but the widget window object could not.  Think perhaps it could be windx related, or com interface related as I added pdf and excel object interfaces to ones I can remember the session issue with. 

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3095
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Program Caching
« Reply #3 on: April 21, 2019, 01:33:28 PM »
Lawrence, generally caching should not be enabled during development when programs are changing.

This is especially important when doing any sort of Global Functions or Objects as these definition lock versions of the code into memory so any changes may NOT be reflected after a Save.

Caching is  provided to improve system performance by maintaining the copies of previously loaded program in memory for re-use.  By definition it should be avoided when these programs are changing.

Lawrence_Leavell

  • Silver Member
  • ***
  • Posts: 35
    • View Profile
Re: Program Caching
« Reply #4 on: May 05, 2019, 12:07:11 PM »
We have carefully reviewed the Parameters and we are not ADDR'ing any programs, yet some programs seem to be locked in memory, very frustrating during a development cycle.  All caching is turned off yet still happening.
Lawrence Leavell

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3095
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Program Caching
« Reply #5 on: May 06, 2019, 10:14:46 AM »
Lawrence

The system automatically locks program in memory if there are any active references to them.  Apart from the ADDR directive, here are some other examples of why programs will be locked:

  • The program is part of an object definition
  • The program defines a global function
  • The program issues a CALL, PERFORM or method/function call thus the return location is on the CALL stack

Also the program editors may update the program files however depending on how you launched the editor the current program may not be updated to reflect the program changes.  For example if you use the NOMADS designer and have it launch a editor session, the updates will not update the current program as they occur in a separate process.

Also the 'PC' system parameter will cause the system to cache programs to improve performance so make sure this is not set.