Uniface User Forum

 View Only
  • 1.  Loading uar-files

    Posted 10-27-2022 09:13


    Does anyone know how Uniface handles loading of uar-files, or know where I could read about it.
    Let's say you have this kind of Resources, where "app30208.uar" contains everything in an application and the other eight rows are patches
    containing primarily some forms, services and messages that have been updated.

    \\OurServer\Data\Uniface9\uar97\app30208patch002.uar    ;a patch containing an update to myform.frm
    \\OurServer\Data\Uniface9\uar97\app30208.uar               ;contains the whole application, lets say one of the forms is myform.frm

    How does Uniface handle these uar-files eg. to get the newest form. Are all these uar-files  loaded at application start, how/when does Uniface know that it should use "app30208patch002.uar" to get the newest myform.frm.

    Could virus scanning affect the loading of the application. 

    Regards RogerW

    Roger Wallin
    Abilita Oy

  • 2.  RE: Loading uar-files

    Posted 10-29-2022 05:02
    As far as I know it reads them in the order you have listed them in, so if you were looking for a component 123.frm, it would look in patch008, if it finds it in there, it stops looking, if it doesn't, it will move down to the next listed uar, patch007, and do the same until it finds it.

    Does that help?

    Toni Davenport
    Uniface Community Edition Shared Account

  • 3.  RE: Loading uar-files

    Posted 10-29-2022 08:22

    Hi Roger,

    about AV software scanning UAR files: I personally did NOT met an issue about it up to now...but I am sure ULab can be more helpful than me about it.

    It is sure compressed files are between the toughest to be checked by any AV software because any single internal file MUST be expanded to look for virus patterns and compressions/decompressions are between most demanding actions for any hardware.

    My 2 cents...

    Best Regards,

    Gianni Sandigliano

  • 4.  RE: Loading uar-files

    Posted 10-31-2022 03:40

    I ask because we once in a while do have problems with slow loading of forms. It's very varying, sometimes being very fast and sometimes very slow, even in the same environment. We will probably do more testing, but it's usually hard to get further especially as it happens at customers and we don't have enough rights to affect virus scanning, control server load etc.

    The first access of a form is usually  slow, and after that the loading of the form is very fast. At worst it could be almost 30-60 seconds to load a form first time, and after that it's fast to start the form. This is of course quite logical, but one would expect Uniface to load more than one form at a time into the memory not happening for all forms and services being used the firs time.

    As this usually happens in client-server environments where the client PC processes the application, I connect it to some or a combination of these
    1. Bad modularization of the application(s)
    2. Loading the applications
    3. AV-software scanning
    4. Too many small uar-files (patches)
    5. Getting data from database  (this is probably not a problem in this case) 

    The original uar-file contains almost 4000 components (forms and services) and furthermore messages, menus etc.
    To me this need some kind of removal of forms not being used or some kind of division of the components. 

    I ask this question hoping to get some hints about how to proceed with the testing and the rebuild of the uar-files. How to get the best results, with less effort/change.

    Regards RogerW.

    Roger Wallin
    Abilita Oy

  • 5.  RE: Loading uar-files

    Posted 11-02-2022 03:11
    Hi Roger,
    From our point of view, using .uar files does not optimize response time. We made some tests with or without using .uar and the time to load  a pool of .frm and .svc x times was the same.
    If you extract your .uar files and work directly on your .frm, .svc, ... files, do you still have your problem ?

    Laurent MEROT
    Proges Plus
    Willems FR

  • 6.  RE: Loading uar-files

    Posted 11-02-2022 04:50

    Hi Laurent,

    you are right, we should do more thorough investigations in that way, which isn't always very easy to do in customer environments.
    However, what I have seen in our own environment, extracting the uar-file is even slower than using uar-files.

    Regards RogerW

    Roger Wallin
    Abilita Oy

  • 7.  RE: Loading uar-files

    Posted 11-08-2022 04:51
    Hello Roger

    I'll copy here general information regarding uar resources and performance in the hope it will help.

    The best practice is not to have one big uar file: Use several uar files.
    Several small uar files versus one big uar file is not expected to give a difference in performance
    that is related to the size of the uar file.
    However with one big uar file one can not play with the order in [RESOURCES]
    to achieve optimal performance
    Searching resources in standardized deployment is more efficient when there are multiple uar files.

    Standard uar files can be stripped from unused objects.
    Best for performance is to limit the objects to search
    and making sure the objects most used are in the begin of the search path.

    It is important to have the most used resources at top and not to include unused resources.
    This aspect is much more important then using one or 20 uar archives:
    Testing shows that the order in [RESOURCES] can make a big difference.

    For each object here is a search order: See Search Order for Global Objects
    For example for menus
    Library Language
    $variation $library
    $variation USA

    and for global proc
    1 CurrentLIB::P2 when not found search for
    2 ComponentLIB::P2 when not found search for
    3 ApplicationLIB::P2 when not found search for

    For each step in the search order the resources specified in [RESOURCES] will be checked.
    So in the worst case one has to go three , four times through these resources.

    ASN settings that might improve performance
    Server setting $ZIP_KEEPOPEN
    has been added
    Uniface library:
    Uniface Reference > Configuration Reference > Configuration Settings: Assignment > [SETTINGS] > $ZIP_KEEPOPEN

    Instructs the Uniface Server to keep every UAR or ZIP archive that it reads open until the Uniface Server itself shuts down.
    Applicable only in deployment environments.

    Client setting
    Uniface library:
    Uniface Reference > Configuration Reference > Configuration Settings: Assignment > [SETTINGS] > $MEMORY
    For example

    Also Remote resources have been added as a new option.
    See Uniface library
    Uniface Reference > Configuration Reference > Configuration Settings: Assignment > [RESOURCES]
    Accessing Remote Resources
    It is now possible to use
    ; client assignment file
    $REMOTE = TCP:ServerHost+13001|user|password|ust

    The Uniface Server's assignment file can specify resource locations that are local to it:
    ; Remote Uniface Server assignment file

    In this case, when the client needs a specific resource, such as a message,
    it will first search the local UAR (myapp_local.uar),
    and if it is not found, it will direct a request to the remote Uniface Server.
    It too searches its resources in the specified order.
    Since each search attempt occurs locally on the server,
    it does not involve any network traffic between client and server,
    providing better performance than specifying multiple remote resources in the client.

    When a client delegates the search for a global object to a resource server,
    the server only looks for the object in the specified library and language.
    It does not follow the normal search order for global objects,
    which falls back to other libraries and languages.

    Peter Beugel
    Principal Technical Support Engineer
    Rocket Software B.V.

    Peter Beugel
    Rocket Internal - All Brands
    Amsterdam NL

  • 8.  RE: Loading uar-files

    Posted 11-09-2022 02:53

    Hello Peter,
    thanks for this.

    I started to think about $MEMORY
    Determine whether ZIP files (including UAR, URR, and DOL files) are mapped to memory. Possible values are:
    On-only the zip directory is mapped in memory
    Off-no memory mapping
    All- entire zip file is mapped in memory

    Here my first quick thoughts about this:
    What actually does "ZIP=All" mean?
    Does it keep the contents of the whole zip-file in memory, ie. also the contents of the zipped files?
    Does other $MEMORY parameters affect  whether the uar-file can be stored in memory?
    I suppose that eg. a frm-file always has to be unzipped as it is needed?
    As the frm-file has been unzipped, is it then kept in memory unzipped, being available for use?
    How/when is the unzipping made by Uniface and does  eg. a virus-scanner notice that something is being unzipped?

    Regards RogerW.

    Roger Wallin
    Abilita Oy

  • 9.  RE: Loading uar-files

    Posted 11-09-2022 09:26
    In the Uniface library the ZIP argument is documented:
    By default, Uniface maps the central directory (table of contents) of ZIP files (such as UAR files) into memory.
    When Uniface needs a piece of the file, it looks at this memory, which triggers a page-fault,
    causing the OS to read in that page of the file as if it were a piece of memory that was swapped to disk.
    Thus, only those pages that are actually addressed by Uniface are read, even though the whole file is mapped to memory.

    The central directory is always read in its entirety, but the rest is only accessed if a particular zipped file is needed from the ZIP archive.
    This improves the performance when applications access these files.

    Memory is released as soon as the central directory has been processed.
    However, if $MEMORY ZIP=ALL has been specified, the memory is not released until the zip file is closed.
    For UAR files, this is typically when the application or Uniface Server ends.
    If the application environment has memory resource limitations, you can set $MEMORY ZIP=OFF to prevent this behavior.

    So with ZIP=ALL the directory is mapped into memory and objects like .frm are read when needed.
    Memory is not released until the zip is closed.

    The arguments for $memory are not related.


    Peter Beugel
    Rocket Internal - All Brands
    Amsterdam NL