Go to Post Sally Ride says role models are needed - that's you. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-04-2014, 01:54
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: CPU at 100%

Why lower the number of global variables? Seems like the worst they can do to performance is stimulate some extra address calculation dances. The global memory page(s) is(are) probably not likely to get swapped out very often when the main line code is running.

The profiler is a wonderful thing. Pay large amounts of attention to Greg McKaskle; it's his job to know this stuff inside and out. We had a mediocre string to DevRev VI that was called way too often, The profiler highlighted the problem in just a minute or two of analysis. And none of us had seen that profiler before. (FIRST Mentor salary: seeing the lights go on in my lead programmer when he started looking at the profiler data and saw the problem about the same time I did).
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
  #2   Spotlight this post!  
Unread 10-04-2014, 07:16
EDesbiens's Avatar
EDesbiens EDesbiens is offline
Passionate crackpot
AKA: Étienne Desbiens
FRC #5859 (i)
Team Role: College Student
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Canton de Hatley, QC, Canada
Posts: 297
EDesbiens is a glorious beacon of lightEDesbiens is a glorious beacon of lightEDesbiens is a glorious beacon of lightEDesbiens is a glorious beacon of lightEDesbiens is a glorious beacon of lightEDesbiens is a glorious beacon of light
Re: CPU at 100%

Quote:
Originally Posted by tcjinaz View Post
Why lower the number of global variables?
We had a lot of global variables and they started dead-locking... We changed some of them into local variables to avoid dead-locks.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-04-2014, 23:58
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: CPU at 100%

Quote:
Originally Posted by EDesbiens View Post
We had a lot of global variables and they started dead-locking... We changed some of them into local variables to avoid dead-locks.
You were writing globals from multiple places? If so, there are some other ways of managing those sorts of communications. They're not in my toolkit today, look for semaphores and queues and the like. And probably you fixed it in the whole with local variables (empirical observations are important).
__________________
Software Mentor
3853 Pridetronics[

Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi