Solved

C# - What is "tight loop code"?

Posted on 2013-01-29
4
568 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
GUID's in SQL Server 4 31
Error in Visual Project 10 48
Easiest intro into .NET CORE? 2 32
How to send the email using C# with embedded HTML TABLE 3 20
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

739 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