• Overview
  • Data on a Windows server
  • Noticed performance
  • Summary of the mechanism of opportunistic locking of Windows
  • Tips for speeding up the applications
  • Version of the operating systems of the client computers
  • Regular network checks
  • Check the knowledge database of Microsoft
  • Be wary of screen savers
  • Be wary of anti-virus programs
  • Checking the applications, real error cases
  • PC Soft can help you optimize
  • Configuring a network
  • Several parameters
  • Common case of network cards
  • HFSQL engine in Client/Server technology
  • Appendix
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
HFSQL in network mode on a server running Windows NT4, 2000, XP or 2003
HFSQLAvailable only with this kind of connection
From version 22, this documentation page is obsolete, it affects systems that are not supported anymore.
The access speed to the data in network depends on several parameters (see the section: "Network: Several parameters").
The main factor is the server and its operating system. Therefore, make sure that the operating system of the server is properly updated.
Some WINDEV users notice that using HFSQL on a network on a Windows server produces a different performance compared to other servers. This document explains the differences may be noticed on a Windows server, depending on the configuration of the server and on the programming used.
This difference in performance can be observed in HFSQL network, whose performance is linked to the network management of the server used. However, this does not occur with HFSQL Client/Server, which independently manages and optimizes concurrent accesses and memory caches.
Data on a Windows server
To check whether a Windows server is updated, make sure that a recent service pack is applied. Which means, on 09/01/2005, the service pack 6 for Windows NT4, the service pack 4 for Windows 2000 and the final version of Windows 2003.

Noticed performance

Summary table of the performance noticed with HFSQL in network mode with a Windows server compared to HFSQL on another type of server:
HFSQLWindows serverOther server (Novell, Linux, ...)
Single userSpecific mechanism of the system that performs an additional optimization.Optimal performance of HFSQL.
Multi-user in read modeSpecific mechanism of the system that performs an additional optimization.Optimal performance of HFSQL.
Multi-user in write/lock modeOptimal performance of HFSQL.Optimal performance of HFSQL.
Client/Server (single-user or multi-user mode)Specific mechanism of the HFSQL engine that performs an additional optimization.Linux server only: Same optimization as for the Windows servers
Note to the users of Hyper File 5.5: Hyper File 5.5 is always slower than HFSQL Classic.

Summary of the mechanism of opportunistic locking of Windows

The system for managing the files of Windows servers changes according to the accesses to the files. An important mechanism of Windows servers is the "opportunistic locking". This mechanism is specific to the Windows server and it is totally independent of WINDEV and HFSQL. From Windows NT 4, service Pack 5, this mechanism of "opportunistic locking" is always operating for the Windows servers.
Let's give a quick explanation of "opportunistic locking" via an example:
A client computer opens a file found on a Windows server. The mechanism of opportunistic locking transfers the entire file (or part of the file) into the local cache of client computer. The next accesses to the file do not use the network anymore but they use the local cache on the client computer. Therefore, the accesses are faster but the data found in the cache may differ from the data found on the server. N client computers can perform this operation, the mechanism is identical: each client computer transfers the entire file (or part of the file) locally.
If a client computer writes into this file (or locks it), the server informs all the clients to disable their local caches to insure the integrity of data. The next accesses to the file by the client computers are performed via the network. The access speed becomes the speed of the network (slower). The opportunistic locks are re-enabled only if all the applications that use the file close this file.
This mechanism has no effect on the performance of HFSQL Client/Server because only the HFSQL engine located on the server accesses the data.
Therefore, the mechanism of opportunistic locks can only optimize the network accesses in "single client" mode or in "multiple clients in read-only" mode.
It is important to understand that the access in multi-user mode is not "slower" but that the access in "single user" mode has been optimized by the recent Windows servers!
It is normal to notice differences of performance from the second connection in modification mode. Note that performance, for a properly sized network, will be identical for 2 or 50 computers!
The performance is similar to the networks that use other server software: Linux, Novell. This is caused by the mechanism of opportunistic locking of Windows.
Note: a professional performance test of a multi-user application will be performed in multi-user mode on real data. Now you understand that a test in single-user mode will provide optimized performance that will not correspond to a real situation. The access in single-user mode may hide conception errors of the application. (see later in this document).
Tips for speeding up the applications

Version of the operating systems of the client computers

The client computers must run the appropriate Windows version. A single client computer that is badly configured or an operating system that is not updated can significantly influence the performance for all the users of a network application. This is not the case with an HFSQL Client/Server database because the data is directly accessed by the HFSQL engine. However, we still recommend that you keep the client computers updated to make sure that the applications operate properly.
  • Windows 98: Second Edition (SE) required
  • Windows Millenium: Service Pack 1 required
  • Windows NT4: Service Pack 6 required
  • Windows 2000: Service Pack 4 required
  • Windows XP: Service Pack 2 required
Note: To find out the version of Windows and the service pack installed on a computer, type "winver" in the "Start .. Run" menu of Windows.

Regular network checks

Checking the network (and especially the server) is required when implementing the application. However, regular checks should be performed if modifications are made to the network (adding new computers, changing cables, ...).
Do not hesitate to call on a network or system specialist in order to check your configuration.

Check the knowledge database of Microsoft

Several factors that affect the performance are related to the operating system.
As the WINDEV applications operate in Windows, it is important to know what the publisher is communicating.
Microsoft publishes on its Internet site a knowledge database with technical articles about known behaviors. ( Caution, no "www")

Be wary of screen savers

Do not use screen savers on the servers. Some screen savers use almost 100% of the server resources when they are enabled and they make the server almost useless for the requested operations.

Be wary of anti-virus programs

Anti-virus software is an important cause of slowdowns in file accesses. If you are using an anti-virus software, the files with a .FIC, .NDX and .MMO extension must be excluded from the check. If you notice a performance decrease when an anti-virus is enabled, temporarily disable this anti-virus and check the performance again. Make sure that you check the anti-virus on the server as well as the ones on the client computers. An anti-virus on a single computer can slow down the entire network.
CAUTION: If an anti-virus is disabled, it must be re-enabled after the tests and once its parameters have been checked and/or modified.

Checking the applications, real error cases

An application intended to be run in network should be checked in network in conditions similar to its real use (with concurrent accesses and real-size files).
The performance of a code executed locally or on a "single-user" network can be completely different in a real use case on a multi-user network.
Non-exhaustive list of common errors found in the existing applications. All these examples come from real reported incidents.
1. 90% of slowness issues are due to inadequate keys:
Resolution: Define the adequate keys in the analysis
In your applications, check the criteria of filters, views and queries. To get good performance at runtime, the files must have the right keys and composite keys. The keys required to get good performance depend on the sort conditions. You should take a close look at the analysis, filters, views and queries in order to select the best possible keys.
This is the reason why WINDEV proposes a query optimizer that analyzes your queries and finds the best keys for them. To optimize a query, when a query is opened in WINDEV, on the "Query" pane, in the "Analyze" group, click "Optimize the query".
It is an automatic mechanism that provides good results. However, for the complex queries or for the queries that use several optional parameters, this options is no substitute for an astute database specialist.
It is hard to say what performance gain can be achieved by using the right keys because situations can change a lot. This gain can go from a 10% improvement in processing time to a 100% improvement and even more.
Caution: if the performance test of a multi-user application is performed in single-user mode, the results of the test are not realistic. Obviously, an application should be tested in its runtime configuration.
2. The files are not "optimized"
Resolution: Start WDOptimizer or plan for an optimization process in the application (HIndex or HStatCalculate)
Files for which statistical calculations (or a re-index operation) have been recently performed will be more efficient. This operation does not require any change in the application. However, regular maintenance operation are required if you want to keep fast accesses to a database. To optimize the access to the files, use WDOptimizer that is provided with WINDEV or use HStatCalculate, HIndex.
3. Excessive use of HCreationIfNotFound
Resolution: Don't use HCreationIfNotFound unless it is necessary, and use the hDelayedOpening constant when HCreationIfNotFound is required.
It is common to find in the applications a HCreationIfNotFound("*") statement or a series of HCreationIfNotFound in the initialization code of the project. This function performs a large number of checks and searches, and therefore it uses a lot of computer time. To avoid wasting time, ask for a delayed check by using the hDelayedOpening constant with HCreationIfNotFound. Even better, you can use this statement only for the files that may be deleted or re-created.
For applications that use a large number of files, this change can save a significant amount of time.
4. Initializations not required or wrongly placed
Resolution: Remove useless initializations, or move them to a more appropriate location.
When initializing the windows that contain several planes or tabs, do not initialize all the planes and tabs as soon as the window is opened. Only run the views and queries of the other planes when the user accesses them.
On the contrary, use HOptimizeQuery in the opening code of window in order for the future execution of these queries to be even faster.
5. Wrongly defined dynamic data sources (not defined in the query editor or in the data model editors)
Resolution: Use the "Data Source" type for each dynamic data source.
When views are created by HCreateView or when queries are created by HExecuteSQLQuery, a name must be specified. This name allows you to use the data source (view or query) like a file. To retrieve the content of the items, use ViewName.ItemName or QueryName.ItemName.
In the code editor, ViewName (or ItemName) is not recognized. In order for the WLanguage compiler to recognize your views and queries, you must declare them. We recommend that you use the "Data Source" type to declare them.
6. Using indirection on an item without specifying its type
Resolution: Specify the type of the indirection
You can use the indirection (braces { }) to dynamically build an item name (or a variable name...). The indirections are used to create generic code but these codes are a little bit slower. Therefore, code that performs read operations, modifications and additions and that uses the indirection can be slower when resolving the indirections than when performing the real operations on the HFSQL data files. To speed up the processes that use the indirection, you have the ability to specify the type of indirection. For more details, see Indirection operators.
7. Using the performance profiler to detect the slowdowns
Resolution: Improve the specific code deemed too slow
There are other types of errors to avoid (useless multiple read operations or initializations, ...) or other types of possible optimization (for example, we strongly recommend that you use HFSQL Client/Server on a slow network or with a DSL access).
Each case is different but the general rule is that when a slowdown is detected, it can be eliminated by finding its origin.
The performance profiler provided with WINDEV is a great tool allowing you to identify the codes that take a long time to run.

PC Soft can help you optimize

If you want PC SOFT to take a look at your application and its source code, there are two possible solutions:
Do not hesitate to contact PC SOFT sales department to get a proposal.
Please note that the interventions of PC SOFT are limited to the products published by PC SOFT and that our engineers do not intervene on the network configurations or on the Windows configurations for example (even if their experience allows them to provide useful advices on a given network).
Configuring a network

Several parameters

A network includes an important number of elements, and each one of these elements can be the culprit in slowing down or breaking the network. Examples:
  • 2 TCP/IP cards with the same address,
  • Conflict with a video card driver,
  • Conflict with a printer driver,
  • Type and speed of the disk drive,
  • Buggy network server (check the publisher site for service packs that need to be installed),
  • The performance of a 100 MB network can crumble because of a simple 10 MB PC card,
  • The presence of electro-magnetic disturbances near cables (transformer, magnet, ...)
  • etc.
Each network comes with its own list of incompatibilities (network cards, WIndows version, printer, ...), check the site of your server publisher on a regular basis.
When in doubt, call a specialized company, endorsed by the publisher of your network server.
A network cannot be installed like a stand-alone PC, it requires specific skills.

Common case of network cards

Some network cards perform much better than some others, therefore it is important to check the installed network cards.
Furthermore, the network cards use drivers for which major updates can exist. Check the site of their publishers.
A too old driver can cause a strong slowdown (often by a factor of 2).
Example of the 3 COM 3C590 Article Microsoft Q139731 cards: Network Errors Using 3COM 3C590 NIC In Windows NT
HFSQL engine in Client/Server technology
As indicated in this document, you can free yourself from the drawbacks of network setup by using the HFSQL Client/Server engine for Windows and for Linux that is supplied at no extra cost with WINDEV.
This Client/Server engine uses many new optimizations to get faster results in any situation.
This document is provided only for information purposes and is not contractual. This information has been checked at the time this document was written (16/09/2005).
Due to the constant evolution of software from PC SOFT as well as from Microsoft, this information may change at any time.
Minimum version required
  • Version 12
This page is also available for…
Click [Add] to post a comment