can you speed up the dequeue of a queue

I have a queue and the queue is getting behind because the data being enqueued is more than being dequeued
how can I speed up the dequeue
  if (localRawQueue.Count != 0 && localCentQueue.Count != 0 && localFilteredQueue.Count != 0)

                    localFilterP = (filteredP)localFilteredQueue.Dequeue();
                    while (fSeries.DataPoints.Count > 600)
                    fSeries.DataPoints.Add(new CategoricalDataPoint() { Value = localFilterP.Value, Category = });

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Can you rephrase your question? Also, is this threaded code?
r3nderAuthor Commented:
I am calling data from the database that is inserting at 4 hertz (4 times a second) I am getting that data from the database and inserting it into a queue (the enqueue process is below
I dequeue it to a chart
the problem is the data is dequeueing slower that it is enqueueing how can I speed up the dequeue process
 int uid = (int)reader["PressureUID"];
                        DateTime initialdate = (DateTime)reader["PressureTime"];
                        DateTime date = initialdate;
                        if (initialdate == prevts)
                            millisecond += 250;
                            date = date.AddMilliseconds(millisecond);
                            millisecond = 0;
                            prevts = initialdate;
                        string strTime = String.Format(CultureInfo.CurrentCulture, "{0:MM/dd/yyyy hh:mm:ss.fff}", date);
                        string format1 = "MM/dd/yyyy HH:mm:ss.fff";
               = DateTime.ParseExact(strTime, format1, null);
                        localFilterP.Value = float.Parse(reader["FilteredPressure"].ToString(), CultureInfo.CurrentCulture);
               = DateTime.ParseExact(strTime, format1, null);
                        localRawP.Value = float.Parse(reader["RawPressure"].ToString(), CultureInfo.CurrentCulture);
                        rawPressure = float.Parse(reader["RawPressure"].ToString(), CultureInfo.CurrentCulture);
               = DateTime.ParseExact(strTime, format1, null);
                        localCentP.Value = float.Parse(reader["cValue"].ToString(), CultureInfo.CurrentCulture);

Open in new window

r3nderAuthor Commented:
I used a while loop
that encompased the entire dequeue

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
r3nderAuthor Commented:
Thanks anyway
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.