Click here to Skip to main content
15,913,773 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralDouble.NaN & Double.PositiveInfinity Pin
Anonymous17-Dec-04 1:55
Anonymous17-Dec-04 1:55 
GeneralRe: Double.NaN & Double.PositiveInfinity Pin
Richard Deeming17-Dec-04 7:00
mveRichard Deeming17-Dec-04 7:00 
GeneralChanging Crystal report display dynamically Pin
Sujith_Manuel16-Dec-04 18:45
Sujith_Manuel16-Dec-04 18:45 
GeneralFilter Drivers Pin
mmsspp15-Dec-04 18:18
mmsspp15-Dec-04 18:18 
GeneralCompac Framework Pin
dcudev.lcr15-Dec-04 8:38
dcudev.lcr15-Dec-04 8:38 
GeneralNo touch deployment bug Pin
itair15-Dec-04 2:32
itair15-Dec-04 2:32 
GeneralRe: No touch deployment bug Pin
itair15-Dec-04 18:26
itair15-Dec-04 18:26 
Questiona bug in loading tiff 16bit images? Pin
anurik15-Dec-04 1:38
anurik15-Dec-04 1:38 
Generalwindow border size Pin
anurik14-Dec-04 23:55
anurik14-Dec-04 23:55 
GeneralRe: window border size Pin
Mathew Hall15-Dec-04 1:24
Mathew Hall15-Dec-04 1:24 
GeneralRe: window border size Pin
anurik15-Dec-04 2:37
anurik15-Dec-04 2:37 
GeneralRe: window border size Pin
benjymous15-Dec-04 5:56
benjymous15-Dec-04 5:56 
GeneralRe: window border size Pin
anurik15-Dec-04 22:54
anurik15-Dec-04 22:54 
GeneralRe: window border size Pin
Mathew Hall16-Dec-04 22:05
Mathew Hall16-Dec-04 22:05 
GeneralTime out with HttpWebRequest Pin
Manjunath N.A14-Dec-04 23:20
Manjunath N.A14-Dec-04 23:20 
GeneralIE Hosting problem Pin
Ryszard Krakowiak14-Dec-04 20:58
Ryszard Krakowiak14-Dec-04 20:58 
QuestionWhich registry values are updated when Windows XP Service Pack (1/2) is installed? Pin
mmsspp14-Dec-04 19:40
mmsspp14-Dec-04 19:40 
AnswerRe: Which registry values are updated when Windows XP Service Pack (1/2) is installed? Pin
Mike Dimmick17-Dec-04 13:19
Mike Dimmick17-Dec-04 13:19 
GeneralConsole Application Pin
har04mich14-Dec-04 11:19
har04mich14-Dec-04 11:19 
GeneralRe: Console Application Pin
Mike Dimmick17-Dec-04 13:27
Mike Dimmick17-Dec-04 13:27 
Generalfile processing time Pin
shaw12314-Dec-04 8:50
shaw12314-Dec-04 8:50 
GeneralRe: file processing time Pin
Mike Dimmick17-Dec-04 13:58
Mike Dimmick17-Dec-04 13:58 
Presumably on the first run none of the file was in cache. However, on the second run, the file was now cached, so reading the file was much faster as the data was already in memory, it didn't need to be read from disk.

When implementing file I/O, you should try to keep locality of reference: process a whole 'page' (4KB) at a time, rather than skipping all over the file. Every time you 'hit' a new page Windows has to read it from the disk into the cache. Windows does try to predict how you're going to use the file in future based on your previous accesses, and it does read ahead, but the fact remains that disks are slow - you should use files carefully. If you do need to jump all over a data structure you could consider reading the whole file sequentially into memory, but if it's a big file you could end up just swapping it straight out to disk again, if you don't have enough physical memory for the whole file.

If you were simply reading the file from beginning to end, some other process was probably using the disk heavily at the same time.

Stability. What an interesting concept. -- Chris Maunder
GeneralIs it possible: start .Net executable by GUID Pin
nielsvdc14-Dec-04 4:40
nielsvdc14-Dec-04 4:40 
GeneralRe: Is it possible: start .Net executable by GUID Pin
devvvy14-Dec-04 5:53
devvvy14-Dec-04 5:53 
GeneralRe: Is it possible: start .Net executable by GUID Pin
nielsvdc14-Dec-04 10:10
nielsvdc14-Dec-04 10:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.