LB Booster
« LBB faster than Windows »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:02am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: LBB faster than Windows  (Read 493 times)
Hans
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 31
xx LBB faster than Windows
« Thread started on: May 25th, 2016, 11:13am »

I noticed the following in several of my programs:

After writing to a file and closing it, I try to rename that file with "NAME". This often fails, but not always. The problem did not occure wth LB. I suspected that closing the file by Windows takes some time. So I paused for 50 milliseconds fore renaming. This worked!

Conclusion:
LBB is faster than LB and sometimes faster than Windows.

Hans
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LBB faster than Windows
« Reply #1 on: May 25th, 2016, 12:57pm »

on May 25th, 2016, 11:13am, Hans wrote:
After writing to a file and closing it, I try to rename that file with "NAME". This often fails, but not always.

You may find that this has something to do with your virus scanner (assuming you have one) rather than Windows itself. Such programs often monitor file creation, so that they can scan each new file as soon as it appears; that may have the effect of 'locking' the file for a short while.

As you can guess, the NAME statement in LBB simply calls the Windows MoveFile API. Indeed this one-line program:

Code:
NAME a$ AS b$ 

gets translated to this in LBB, as you can see by selecting 'Show LBB pane' in the Options menu:

Code:
SYS "MoveFile", a$, b$ TO R% 

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls