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 8282905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:32:50+00:00 2026-06-08T10:32:50+00:00

I need to cause some code in my application to be pre-JITted. The scenario

  • 0

I need to cause some code in my application to be pre-JITted. The scenario is an XNA game running under Windows Phone. When an explosion first happens, there is a noticeable pause while the methods that implement the explosion physical modelling are JITted. I know this because this issue happens on the Windows build as well, and disappears when the assemblies are NGEN’d. I have also used the method of JITting at runtime which is mentioned in a few answers here and originates on CodeProject (using reflection and PrepareMethod) .

However, I can’t use NGEN, because it’s a Windows Phone app. I also can’t use the other method PrepareMethod is marked as SecurityCritical, and you can’t call that on Windows Phone.

I don’t mind the fact that it may take some time, because the initialisation would happen on a separate thread while a loading screen is displayed.

Are there any elegant methods to achieve a similar result and, failing that, any methods at all?

  • 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-06-08T10:32:52+00:00Added an answer on June 8, 2026 at 10:32 am

    In Windows Phone as of now, the only thing you can do is force the method to be JITed is by actually calling it.

    I would call the method while your application is loading, perhaps while it is showing a load screen or something. That way when the user actually hits it during the game, the JIT has already been taken care of.

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

Sidebar

Related Questions

I need some inspiration for a solution... We are running an online game with
I have a Windows Phone application I am developing that needs to persist some
I need to build some client side code which follows this use case: An
We need to identify and then process switch/case statements in code based on some
I'm writing some code in which I need to use my own HttpResponse object
I need to create a .NET application that will store some confidential information to
In my application,I need to do some iteration with the array-like object. So I
Please forgive my attempts at necromancy, but I actually need to write some code
For some reason I have to have a windows client application (written in C#)
I have some C source files that need to be pre-processed so that I

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.