Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:01:38+00:00 2026-05-28T08:01:38+00:00

I am building a WP7 application which heavily uses RX and I came across

  • 0

I am building a WP7 application which heavily uses RX and I came across a problem. When adding Throttle with a value bigger that 20 ms it significantly reduces performance.

The snippet below pinpoints the issue:

var moveObs = Observable.FromEventPattern<MouseEventHandler, MouseEventArgs>(
                    h => this.MouseMove += h,
                    h => this.MouseMove -= h);

// Observe dragging
var yObs = (from x in moveObs
            select -(x.EventArgs.GetPosition(this).Y - _initY));

var result = yObs.SkipWhile(y => !_isDragging)
                 .Throttle(TimeSpan.FromMilliseconds(33));

result.TimeInterval()
      .Subscribe(x => Debug.WriteLine("Mouse move interval: " + x));

Here is output of the snippet:

'UI Task' (Managed): Loaded 'Microsoft.Devices.Sensors.dll'
The thread '<No Name>' (0x1e18) has exited with code 0 (0x0).
Mouse move interval: 80@00:00:04.1920000
Mouse move interval: -160@00:00:00.2900000
Mouse move interval: -126@00:00:00.6710000
The thread '<No Name>' (0x22a4) has exited with code 0 (0x0).
Mouse move interval: -90@00:00:01.0460000
The thread '<No Name>' (0x2514) has exited with code 0 (0x0).
Mouse move interval: -113@00:00:00.3250000
The thread '<No Name>' (0x270c) has exited with code 0 (0x0).
Mouse move interval: 108@00:00:12.1420000
The thread '<No Name>' (0x186c) has exited with code 0 (0x0).
Mouse move interval: 221@00:00:01.4860000

So to my understanding Throttle will create a thread from thread pool and won’t block UI and it should be quite efficient, shouldn’t it?

Question
So why is performance so slow. I am a novice in RX so I am probably missing something here.

Edit

Here is another sample which reproduces the same issue:

var oneNumberPerSecond = Observable.Interval(TimeSpan.FromMilliseconds(10));

var lowNums = from n in oneNumberPerSecond
              select n;


lowNums.Throttle(TimeSpan.FromMilliseconds(100))
       .TimeInterval()
       .Subscribe(lowNum => Debug.WriteLine(lowNum));

In my understanding this should print a number every 100 ms, however it doesn’t print any.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:01:39+00:00Added an answer on May 28, 2026 at 8:01 am

    It’s not that it’s slow – what you’ve described is exactly the behavior of Throttle.

    Throttle produces a value when the stream stops producing a value for the specified duration.

    Let me break down your repro:

    var oneNumberPerSecond = Observable.Interval(TimeSpan.FromMilliseconds(10));
    

    This is a cold observable which produces a value every 10 msecs.

    var lowNums = from n in oneNumberPerSecond
                  select n;
    

    This does nothing really. It’s equivalent to oneNumberPerSecond.Select(i => i)

    lowNums.Throttle(TimeSpan.FromMilliseconds(100))
    

    This produces a stream which will produce a value whenever lowNums stops producing a value for 100msecs. But since lowNums produces a value every 10 msecs, there won’t be a time when nothing happens for 100msecs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building an excel spreadsheet is a classic asp application. The problem now is that
Building a stand alone WPF application that uses a MSSQL backend. I would like
I'm building this WP7 app that uses a video game API to get the
I'm building WP7 application using DropNet. I have successfully managed to log in and
I am building a localized wp7 application by following the MSDN article How to:
Building an application with a database that has the ability to get big not
I have a WP7 application which consumes a Windows Azure web service. I've currently
I am building a WP7 app that consist on one listbox in the first
I'm building an app for WP7 and it occurred to me that the HTC
Building a multilingual application that should work with the most prevalent global alphabets but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.