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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:38:37+00:00 2026-05-11T15:38:37+00:00

I am currently trying to tackle a speed issue involving loading and saving richtext.

  • 0

I am currently trying to tackle a speed issue involving loading and saving richtext. Here are the details. In my application I have a Question class which needs to be able to store two richtexts. At the moment these two richtexts are being stored in the Question class as TextRanges. As far as saving/loading goes I am using TextRange.Load(Stream, DataFormats) and TextRange.Save(Stream, DataFormats). Everything works…

My problem is that I need to have 1000+ of these questions save/load from a file. When I do this saving/loading a file that contains these questions takes 20~ seconds. And on top of that, I would like to be able to load several of these files at once…which would leave the user waiting for possibly several minutes. I’m sure my problem is clear now.

So I started to investigate why it was taking so long to save/load a file and from a profiler I found that 80% of the time spent saving/loading a file is in the TextRange.Load and TextRange.Save methods.

So my question is…Does anyone have any suggestions or pointers to speeding up my file save/load?

I was trying to think of another way to store the richtext in both the Question class and in the file. I ran out of ideas fairly quickly but wanted to come here before I conceded. Any help is greatly appreciated. Also let me know if I need to clarify anything. Thank you!

  • 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. 2026-05-11T15:38:37+00:00Added an answer on May 11, 2026 at 3:38 pm

    How much overhead is there in each call to Load and Save, is there any advantage to calling Load once for a big range versus many times for small ranges? How many times do you call Load when you load +1000 Questions? Is each act of calling Load updating a RichTextBox or a Flow Document somewhere? If not what are you doing with the TextRanges once you have them loaded?

    I noticed this related thread and thought I would offer a suggestion: What if you save the byte arrays (or memory streams) in the Question class instead of the TextRange and only create the TextRange when you actually need to load your data in the RichTextBox (when the window for the question opens)?

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

Sidebar

Related Questions

No related questions found

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.