ReleaseNotes:Feature Review December 2010: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
5.25e to 5.30f
This review covers Planimate® versions 5.25e to 5.30f  


in addition to new features, 2010 saw a lot of consolidation, cleanups, fixes and optimisations for Planimate. A key goal was achieving a solid release which could become the core of the next full Planimate install, version 5.25z3. Versions then jumped to 5.30 which started with a big cleanout of old model load code. This enabled a lot of legacy code to be removed, in the process improving performance.
In addition to new features, 2010 saw a lot of consolidation, cleanups, fixes and optimisation for Planimate. A solid release version (5.25z3) was achieved which is the core of the next full Planimate install. Versions then jumped to 5.30 which started with a big cleanout of old model load code. This enabled a lot of legacy code to be removed, in the process improving performance.  


The loader cleanup means older models have to be loaded/saved using the latest 5.25 release before they will load in 5.30 versions of Planimate.
The loader cleanup means older models have to be loaded/saved using the latest 5.25 release before they will load in 5.30 versions of Planimate.  


This is a summary of key changes and new features only. For details and fixes refer to the release notes.
This is a summary of key changes and new features only. For details and fixes refer to the release notes.  


__TOC__
__TOC__  


== Modularity And Platform  ==
== Modularity And Platform  ==
Line 13: Line 13:
=== Release Compilation Environment  ===
=== Release Compilation Environment  ===


Planimate 32 bit releases are now compiled with Microsoft Visual Studio 2008. This compiler generates a better EXE which noticeably improves performance especially for routine code.
Planimate 32 bit releases are now compiled with Microsoft Visual Studio 2008. This compiler generates a better EXE which noticeably improves performance especially for routine code.  


Beyond using the new compiler, many speed optimisations were made to the simulation engine, model representation, panel handling, tracks and table related functionality.
Beyond using the new compiler, many speed optimisations were made to the simulation engine, model representation, panel handling, tracks and table related functionality.  


=== Planimate calling a DLL  ===
=== Planimate calling a DLL  ===


The DLL cal API has been enhanced to expose more Planimate functionality to the DLL. DLLs can now query the PL clock time and engine state. They can also post a broadcast that will be subsequently processed by Planimate as an event. This gives a way for a DLL to signal a model for action.
The DLL call API has been enhanced to expose more Planimate functionality. DLLs can now query the Planimate clock time and engine state. They can also post a broadcast that will be subsequently processed by Planimate as an event. This gives a way for a DLL to signal a model for action.  


A new API for callbacks to Planimate from a called DLL has been added. New features include getting Planimate to grow a table's allocation, popping up a message and triggering a breakpoint (useful for debugging).
A new API for callbacks to Planimate from a called DLL has been added. New features include getting Planimate to grow a table's allocation, popping up a message and triggering a breakpoint (useful for debugging).  


NOTE: Old DLLs (typically > 5 years) not compiled with "column order" are no longer supported.
NOTE: Old DLLs (typically > 5 years) not compiled with "column order" are no longer supported.  


=== Planimate as-a-DLL / dotNET  ===
=== Planimate as-a-DLL / dotNET  ===


The dotNET interface is mature and used in production applications.
The dotNET interface is mature and used in production applications.  


New APIs have been added enabling "background" broadcasts to be initiated from dotNET which PL processes silently while appearing paused.
New APIs have been added enabling "background" broadcasts to be initiated from dotNET which PL processes silently while appearing paused.  


== Model Editing  ==
== Model Editing  ==
Line 35: Line 35:
=== Copy Paste  ===
=== Copy Paste  ===


Copy/Paste was enhanced to improve performance and enable moving of very large portals. The new "Paste Once" background menu option for copied portals performs a much more efficient and cleaner copy/paste if only one copy of the portal is needed.
Copy/Paste was enhanced to improve performance and enable moving of very large portals. The new "Paste Once" background menu option for copied portals performs a much more efficient and cleaner copy/paste if only one copy of the portal is needed.  


Pipe settings can be copied between pipes.
Pipe settings can be copied between pipes.  


In object mode, CTRL-C now copies one or more selected objects. CTRL-V pastes the copied objects at the top left corner of the panel and selects them so they can be dragged.
In object mode, CTRL-C now copies one or more selected objects. CTRL-V pastes the copied objects at the top left corner of the panel and selects them so they can be dragged.  


=== Icon Palette/Mover Icon Lists  ===
=== Icon Palette/Mover Icon Lists  ===


The icon mover and icon palette selectors now have lists of the icons, sorted by name, enabling the highlight to be moved using the list. This makes finding icons/DBs by name much easier.
The icon mover and icon palette selectors now have lists of the icons, sorted by name, enabling the highlight to be moved using the list. This makes finding icons/DBs by name much easier.  


=== Value Formatting  ===
=== Value Formatting  ===


The value formating units have been renamed and a number of new ones added including modes that count days/weeks from 1 and "Calendar YYYYMMDDhhmmss"
The value formating units have been renamed and a number of new ones added including modes that count days/weeks from 1 and "Calendar YYYYMMDDhhmmss"  


=== Reference Editing  ===
=== Reference Editing  ===


The way attribute references are edited outside of a routine (eg: when referenced to set object properties like Multi-server Capacity) has been enhnanced. A new dialog displayes and edits expressions textually. Planimate will assist with drop down lists of attributes/tables/labels (as in the routine editor).
The way attribute references are edited outside of a routine (eg: when referenced to set object properties like Multi-server Capacity) has been enhnanced. A new dialog displayes and edits expressions textually. Planimate will assist with drop down lists of attributes/tables/labels (as in the routine editor).  


These new references can include mathematical expressions, enabling quick calculations and offsets "as-needed" rather than having to use a lot of temporary attributes and a routine to achieve the same result.
These new references can include mathematical expressions, enabling quick calculations and offsets "as-needed" rather than having to use a lot of temporary attributes and a routine to achieve the same result.  


In this editor the F2 key enables inserting a reference using the older UI dialog. It is not an editor for the reference but is useful when creating a new reference if you are not sure of the syntax.
In this editor the F2 key enables inserting a reference using the older UI dialog. It is not an editor for the reference but is useful when creating a new reference if you are not sure of the syntax.  


Pressing "Ctrl-F" in the editor will show a list of functions, if the cursor is after a "." then it will show a list of properties. These functions can be combined in expressions referring to multiple portal/item attributes and table cells.
Pressing "Ctrl-F" in the editor will show a list of functions, if the cursor is after a "." then it will show a list of properties. These functions can be combined in expressions referring to multiple portal/item attributes and table cells.  


The references can contain quoted values/dates/times which will be parsed at runtime, enabling a value like "1d" or "3:30" to be used instead of seconds.
The references can contain quoted values/dates/times which will be parsed at runtime, enabling a value like "1d" or "3:30" to be used instead of seconds.  


Example references:
Example references:  


p.attribute + 120
p.attribute + 120 p,attribute + "1d" i.time_entered - "0:30" "1jan2010 12:34:55" + "1w"  
p,attribute + "1d"
i.time_entered - "0:30"
"1jan2010 12:34:55" + "1w"


=== Item Table Reference Notation  ===
=== Item Table Reference Notation  ===


There is a new notation for item table references: instead of s.item.tablerefname[1][2] you can now use i.tablerefname[1][2]
There is a new notation for item table references: instead of s.item.tablerefname[1][2] you can now use i.tablerefname[1][2]  


=== Attribute/Cell View Enhancements  ===
=== Attribute/Cell View Enhancements  ===


Attribute and Cell Views have options particularly for labels which make them much more like table views in functionality (editing with field, combo, combo add and dropdown options).
Attribute and Cell Views have options particularly for labels which make them much more like table views in functionality (editing with field, combo, combo add and dropdown options).  


=== _SYSTEM.DB updated  ===
=== _SYSTEM.DB updated  ===


Note that the _!SYSTEM.DB file has new icons and should be updated from idBase or a full Planimate 5.25z install when you upgrade to a newer version of Planimate.
Note that the _!SYSTEM.DB file has new icons and should be updated from idBase or a full Planimate 5.25z install when you upgrade to a newer version of Planimate.  


== Runtime Engine  ==
== Runtime Engine  ==
Line 84: Line 81:
=== Dynamic Network Building  ===
=== Dynamic Network Building  ===


One of the most significant enhancements in 2010 is Planimate's ability to copy portals and tracks within a model whilst the model is running. This enables a model to dynamically add network nodes without restarting and a track/spatial link/pipe network to build itself from an external specification without manual model editing.
One of the most significant enhancements in 2010 is Planimate's ability to copy portals and tracks within a model whilst the model is running. This enables a model to dynamically add network nodes without restarting and a track/spatial link/pipe network to build itself from an external specification without manual model editing.  


It capitalises on Planimate's executable data structure design and comes with a performance boost due to refactoring and cleanup.
It capitalises on Planimate's executable data structure design and comes with a performance boost due to refactoring and cleanup.  


(new routine operations CopyPortal, AddTrack, AddPipe, RemoveTrack, QueryNetwork, GenerateTrackTable)
(new routine operations CopyPortal, AddTrack, AddPipe, RemoveTrack, QueryNetwork, GenerateTrackTable)  


=== Smoother Handling Of Network Changes  ===
=== Smoother Handling Of Network Changes  ===


Dynamically added objects now add themselves to the object list to avoid unnecessary querying of the user for object names. Prompting is significantly reduced when track networks are updated.
Dynamically added objects now add themselves to the object list to avoid unnecessary querying of the user for object names. Prompting is significantly reduced when track networks are updated.  


=== Table Enhancements  ===
=== Table Enhancements  ===


Modellers have the ability to dynamically select a region of a table in code through new Table View Properties, usable with GetViewProperty() and SetViewProperty()
Modellers have the ability to dynamically select a region of a table in code through new Table View Properties, usable with GetViewProperty() and SetViewProperty()  


More table column properties are accessible in code.
More table column properties are accessible in code.  


Routine operations SetViewFilterRows() and ClearFilter() enable the model to control which rows of a table are viewed.
Routine operations SetViewFilterRows() and ClearFilter() enable the model to control which rows of a table are viewed.  


A new Advanced-Find option can find tables which are cleared on save.
A new Advanced-Find option can find tables which are cleared on save.  


Tables give modellers more options in managing memory preallocation. The table editor -> Advanced option "Expected Row Limit" now shows in brackets the number of rows the table is currently preallocated for (which is different to the number of rows the table contains).
Tables give modellers more options in managing memory preallocation. The table editor -> Advanced option "Expected Row Limit" now shows in brackets the number of rows the table is currently preallocated for (which is different to the number of rows the table contains).  


The File Menu->Model Properties report includes useful memory information for tables. This looks best if pasted into a spreadsheet.
The File Menu->Model Properties report includes useful memory information for tables. This looks best if pasted into a spreadsheet.  


Table Views have an explicit option "Advance Cell After Edit" to control how the cell advances after an edit. Making this option explicit makes it possible to have the cell advance even when a cell edit broadcast is sent.
Table Views have an explicit option "Advance Cell After Edit" to control how the cell advances after an edit. Making this option explicit makes it possible to have the cell advance even when a cell edit broadcast is sent.  


=== Debugging  ===
=== Debugging  ===


"Produce Item On Click" entries now continue to work in user mode, making them useful to trigger behaviour in debugging/administration panels. They avoid having to set up buttons/broadcasts/broadcast entries.
"Produce Item On Click" entries now continue to work in user mode, making them useful to trigger behaviour in debugging/administration panels. They avoid having to set up buttons/broadcasts/broadcast entries.  


=== New Entry Mode  ===
=== New Entry Mode  ===


Entries have a new mode: "Table Driven Index". This is a table driven entry mode that does not remove rows from the source table, instead the entry keeps an index of the rows it has processed. This enables table driven entries to work directly off tables without copies having to be made of the schedule data (because the entry used to delete the completed rows) and is also much more efficient when there are many rows driving the entry.
Entries have a new mode: "Table Driven Index". This is a table driven entry mode that does not remove rows from the source table, instead the entry keeps an index of the rows it has processed. This enables table driven entries to work directly off tables without copies having to be made of the schedule data (because the entry used to delete the completed rows) and is also much more efficient when there are many rows driving the entry.  


(the existing "Table Driven" mode has been renamed to Table Driven Remove Row)
(the existing "Table Driven" mode has been renamed to Table Driven Remove Row)  


=== Multiserver Animation Enhancement  ===
=== Multiserver Animation Enhancement  ===


Multiservers have an option "Animate Item To Road Start" which enables the item to 0-time animate to the start of a road. By default this is off. Its useful when 0-time animation (low values of Animate Speed) is used to show items flowing between objects.
Multiservers have an option "Animate Item To Road Start" which enables the item to 0-time animate to the start of a road. By default this is off. Its useful when 0-time animation (low values of Animate Speed) is used to show items flowing between objects.  


=== Random Distribution Update  ===
=== Random Distribution Update  ===


The distribution pattern selection dialog was rewritten. It now has a consitent layout, clearer labelling of parameters, correctly handles time parameters vs. those that are numeric and a better preview plot.
The distribution pattern selection dialog was rewritten. It now has a consitent layout, clearer labelling of parameters, correctly handles time parameters vs. those that are numeric and a better preview plot.  


A new distribution "Equally Likely (Min/Max)" is a uniform specified using a min/max rather than an average/range. This is useful for integral ranges. To generate a uniform integer, say 1 to 10 you can now use min: 0.5 max: 10.5 Round/Units
A new distribution "Equally Likely (Min/Max)" is a uniform specified using a min/max rather than an average/range. This is useful for integral ranges. To generate a uniform integer, say 1 to 10 you can now use min: 0.5 max: 10.5 Round/Units  


=== Random Number Logging  ===
=== Random Number Logging  ===


There is a new debugging option to log random numbers to the Planimat.dbg file. Note that Planimate only generates the debug file with the /DEBUGFILE command line option.
There is a new debugging option to log random numbers to the Planimat.dbg file. Note that Planimate only generates the debug file with the /DEBUGFILE command line option.  


=== Random Number Seed Change  ===
=== Random Number Seed Change  ===


A change to the new random number generator will make runs different if they are using it. The way it is seeded has been improved.<br>
A change to the new random number generator will make runs different if they are using it. The way it is seeded has been improved.<br>  


=== String Enhancements  ===
=== String Enhancements  ===


Routine operation RemapName() enables text to be processed through Planimate's file name remapping as occurs for Change-&gt;File operations. This enables substitution of matching text with entries provided at runtime in an INI file.
Routine operation RemapName() enables text to be processed through Planimate's file name remapping as occurs for Change-&gt;File operations. This enables substitution of matching text with entries provided at runtime in an INI file.  


See http://wiki.planimate.com/Model_INI_File for details on file name remapping.
See http://wiki.planimate.com/Model_INI_File for details on file name remapping.  


New routine operations enable string properties like column tool tips to be set dynamically (SetColumnTip()) as well as setting and reading the state of the column filter (GetColumnFilter(),SetColumnFilter()).
New routine operations enable string properties like column tool tips to be set dynamically (SetColumnTip()) as well as setting and reading the state of the column filter (GetColumnFilter(),SetColumnFilter()).  


=== Debugging  ===
=== Debugging  ===


*Customised menubars are retained when switching to edit mode and back to user mode.
*Customised menubars are retained when switching to edit mode and back to user mode.  
*A new "Show System Attributes" option in the debug/breakpoint window shows all the system attributes during a breakpoint.
*A new "Show System Attributes" option in the debug/breakpoint window shows all the system attributes during a breakpoint.


=== Large Image Performance  ===
=== Large Image Performance  ===


Paint buttons have an option to preload images. This is uesful where a button state is used to display a large image which takes time to load.
Paint buttons have an option to preload images. This is uesful where a button state is used to display a large image which takes time to load.  


== Data  ==
== Data  ==
Line 159: Line 156:
=== DataSet1 Obsolete  ===
=== DataSet1 Obsolete  ===


Dataset1 is obsolete and will be progressively removed in 5.30 releases. Saving will be removed first, loading later. This includes the DataSet1 specific menu options in the default "User" Menu. Applications should not rely on these menu options remaining there.<br>
Dataset1 is obsolete and will be progressively removed in 5.30 releases. Saving will be removed first, loading later. This includes the DataSet1 specific menu options in the default "User" Menu. Applications should not rely on these menu options remaining there.<br>  


=== DataSet2 Performance  ===
=== DataSet2 Performance  ===


DataSet2 now supports millions of labels and free text cells.
DataSet2 now supports millions of labels and free text cells.  


Note DataSet2 only supports tables with up to 500 million rows.
Note DataSet2 supports tables with up to 500 million rows.  


=== File Reading  ===
=== File Reading  ===


A new Change-&gt;File mode enables testing of text files to determine how many lines they contain. For extremely large files this can be useful in preallocating memory in a table which will be used to load the file.
A new Change-&gt;File mode enables testing of text files to determine how many lines they contain. For extremely large files this can be useful in preallocating memory in a table which will be used to load the file.  


<br>
<br>


[[Category:Release Note]]
[[Category:Release Note]]

Latest revision as of 20:29, 14 March 2011

This review covers Planimate® versions 5.25e to 5.30f

In addition to new features, 2010 saw a lot of consolidation, cleanups, fixes and optimisation for Planimate. A solid release version (5.25z3) was achieved which is the core of the next full Planimate install. Versions then jumped to 5.30 which started with a big cleanout of old model load code. This enabled a lot of legacy code to be removed, in the process improving performance.

The loader cleanup means older models have to be loaded/saved using the latest 5.25 release before they will load in 5.30 versions of Planimate.

This is a summary of key changes and new features only. For details and fixes refer to the release notes.

Modularity And Platform

Release Compilation Environment

Planimate 32 bit releases are now compiled with Microsoft Visual Studio 2008. This compiler generates a better EXE which noticeably improves performance especially for routine code.

Beyond using the new compiler, many speed optimisations were made to the simulation engine, model representation, panel handling, tracks and table related functionality.

Planimate calling a DLL

The DLL call API has been enhanced to expose more Planimate functionality. DLLs can now query the Planimate clock time and engine state. They can also post a broadcast that will be subsequently processed by Planimate as an event. This gives a way for a DLL to signal a model for action.

A new API for callbacks to Planimate from a called DLL has been added. New features include getting Planimate to grow a table's allocation, popping up a message and triggering a breakpoint (useful for debugging).

NOTE: Old DLLs (typically > 5 years) not compiled with "column order" are no longer supported.

Planimate as-a-DLL / dotNET

The dotNET interface is mature and used in production applications.

New APIs have been added enabling "background" broadcasts to be initiated from dotNET which PL processes silently while appearing paused.

Model Editing

Copy Paste

Copy/Paste was enhanced to improve performance and enable moving of very large portals. The new "Paste Once" background menu option for copied portals performs a much more efficient and cleaner copy/paste if only one copy of the portal is needed.

Pipe settings can be copied between pipes.

In object mode, CTRL-C now copies one or more selected objects. CTRL-V pastes the copied objects at the top left corner of the panel and selects them so they can be dragged.

Icon Palette/Mover Icon Lists

The icon mover and icon palette selectors now have lists of the icons, sorted by name, enabling the highlight to be moved using the list. This makes finding icons/DBs by name much easier.

Value Formatting

The value formating units have been renamed and a number of new ones added including modes that count days/weeks from 1 and "Calendar YYYYMMDDhhmmss"

Reference Editing

The way attribute references are edited outside of a routine (eg: when referenced to set object properties like Multi-server Capacity) has been enhnanced. A new dialog displayes and edits expressions textually. Planimate will assist with drop down lists of attributes/tables/labels (as in the routine editor).

These new references can include mathematical expressions, enabling quick calculations and offsets "as-needed" rather than having to use a lot of temporary attributes and a routine to achieve the same result.

In this editor the F2 key enables inserting a reference using the older UI dialog. It is not an editor for the reference but is useful when creating a new reference if you are not sure of the syntax.

Pressing "Ctrl-F" in the editor will show a list of functions, if the cursor is after a "." then it will show a list of properties. These functions can be combined in expressions referring to multiple portal/item attributes and table cells.

The references can contain quoted values/dates/times which will be parsed at runtime, enabling a value like "1d" or "3:30" to be used instead of seconds.

Example references:

p.attribute + 120 p,attribute + "1d" i.time_entered - "0:30" "1jan2010 12:34:55" + "1w"

Item Table Reference Notation

There is a new notation for item table references: instead of s.item.tablerefname[1][2] you can now use i.tablerefname[1][2]

Attribute/Cell View Enhancements

Attribute and Cell Views have options particularly for labels which make them much more like table views in functionality (editing with field, combo, combo add and dropdown options).

_SYSTEM.DB updated

Note that the _!SYSTEM.DB file has new icons and should be updated from idBase or a full Planimate 5.25z install when you upgrade to a newer version of Planimate.

Runtime Engine

Dynamic Network Building

One of the most significant enhancements in 2010 is Planimate's ability to copy portals and tracks within a model whilst the model is running. This enables a model to dynamically add network nodes without restarting and a track/spatial link/pipe network to build itself from an external specification without manual model editing.

It capitalises on Planimate's executable data structure design and comes with a performance boost due to refactoring and cleanup.

(new routine operations CopyPortal, AddTrack, AddPipe, RemoveTrack, QueryNetwork, GenerateTrackTable)

Smoother Handling Of Network Changes

Dynamically added objects now add themselves to the object list to avoid unnecessary querying of the user for object names. Prompting is significantly reduced when track networks are updated.

Table Enhancements

Modellers have the ability to dynamically select a region of a table in code through new Table View Properties, usable with GetViewProperty() and SetViewProperty()

More table column properties are accessible in code.

Routine operations SetViewFilterRows() and ClearFilter() enable the model to control which rows of a table are viewed.

A new Advanced-Find option can find tables which are cleared on save.

Tables give modellers more options in managing memory preallocation. The table editor -> Advanced option "Expected Row Limit" now shows in brackets the number of rows the table is currently preallocated for (which is different to the number of rows the table contains).

The File Menu->Model Properties report includes useful memory information for tables. This looks best if pasted into a spreadsheet.

Table Views have an explicit option "Advance Cell After Edit" to control how the cell advances after an edit. Making this option explicit makes it possible to have the cell advance even when a cell edit broadcast is sent.

Debugging

"Produce Item On Click" entries now continue to work in user mode, making them useful to trigger behaviour in debugging/administration panels. They avoid having to set up buttons/broadcasts/broadcast entries.

New Entry Mode

Entries have a new mode: "Table Driven Index". This is a table driven entry mode that does not remove rows from the source table, instead the entry keeps an index of the rows it has processed. This enables table driven entries to work directly off tables without copies having to be made of the schedule data (because the entry used to delete the completed rows) and is also much more efficient when there are many rows driving the entry.

(the existing "Table Driven" mode has been renamed to Table Driven Remove Row)

Multiserver Animation Enhancement

Multiservers have an option "Animate Item To Road Start" which enables the item to 0-time animate to the start of a road. By default this is off. Its useful when 0-time animation (low values of Animate Speed) is used to show items flowing between objects.

Random Distribution Update

The distribution pattern selection dialog was rewritten. It now has a consitent layout, clearer labelling of parameters, correctly handles time parameters vs. those that are numeric and a better preview plot.

A new distribution "Equally Likely (Min/Max)" is a uniform specified using a min/max rather than an average/range. This is useful for integral ranges. To generate a uniform integer, say 1 to 10 you can now use min: 0.5 max: 10.5 Round/Units

Random Number Logging

There is a new debugging option to log random numbers to the Planimat.dbg file. Note that Planimate only generates the debug file with the /DEBUGFILE command line option.

Random Number Seed Change

A change to the new random number generator will make runs different if they are using it. The way it is seeded has been improved.

String Enhancements

Routine operation RemapName() enables text to be processed through Planimate's file name remapping as occurs for Change->File operations. This enables substitution of matching text with entries provided at runtime in an INI file.

See http://wiki.planimate.com/Model_INI_File for details on file name remapping.

New routine operations enable string properties like column tool tips to be set dynamically (SetColumnTip()) as well as setting and reading the state of the column filter (GetColumnFilter(),SetColumnFilter()).

Debugging

  • Customised menubars are retained when switching to edit mode and back to user mode.
  • A new "Show System Attributes" option in the debug/breakpoint window shows all the system attributes during a breakpoint.

Large Image Performance

Paint buttons have an option to preload images. This is uesful where a button state is used to display a large image which takes time to load.

Data

DataSet1 Obsolete

Dataset1 is obsolete and will be progressively removed in 5.30 releases. Saving will be removed first, loading later. This includes the DataSet1 specific menu options in the default "User" Menu. Applications should not rely on these menu options remaining there.

DataSet2 Performance

DataSet2 now supports millions of labels and free text cells.

Note DataSet2 supports tables with up to 500 million rows.

File Reading

A new Change->File mode enables testing of text files to determine how many lines they contain. For extremely large files this can be useful in preallocating memory in a table which will be used to load the file.