Solved

C# - What is "tight loop code"?

Posted on 2013-01-29
4
528 Views
Last Modified: 2013-02-24
In the following article the author VB Rocks refers to "tight loop code". What is "tight loop code"?

http://www.codeproject.com/Articles/38555/WPF-ProgressBar

There are many situations where "tight loops" are required in code, such as when data is being read from a file. A standard coding approach is to open the file, then loop through the entire file, reading either lines, characters, or bytes in each pass. A progress bar may be used to report the progress of this operation.
0
Comment
Question by:jdana
4 Comments
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 116 total points
ID: 38831411
From Wiktionary:

(computing) In assembly languages, a loop which contains few instructions and iterates many times.
(computing) Such a loop which heavily uses I/O or processing resources, failing to adequately share them with other programs running in the operating system.
For case 1 it is probably like

for (unsigned int i = 0; i < 0xffffffff; ++ i) {}
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 117 total points
ID: 38831417
Looking at the article my opinion is that in a tight loop (in WPF) the interface is given no chance to update.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 117 total points
ID: 38831801
A block of code which loops but does not release any resources during the loop.
0
 

Author Closing Comment

by:jdana
ID: 38923026
AndyAinscow and CodeCruiser - I agree, in the context of this article, "tight-loop" code is code that's opaque to other processes (and the GUI).
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question