Skip to main content

Violoncello and Optimization

I was about ready to release Violoncello. I felt like I had finally finished this huge project that I started over a month ago. However, there was one major obstacle left in my path: optimization. This had been something I struggled with throughout Violoncello’s development, but I had fixed a lot of issues in that area. At this point, I only had one major issue left: Violoncello was incredibly slow.

Unfortunately, that’s where the story ends. As of the morning I am writing this, I still need to fix this issue. Unfortunately, if I want better loading speeds, I’m going to have to rewrite a lot of code. Here’s why...

The Enemy: Html.fromHtml

To convert the HTML to a thing called a Spannable, necessary to load it in a TextView, Android offers Html.fromHtml. Problem is, it’s not very fast. Sure, it’s fine for loading simple pages, but if you want to load a decently-sized Wikipedia article, it can take a very long time. As long as 30 seconds in my testing, in fact. Put simply, loading speeds are too slow for my liking.

Why not use an alternative to Html.fromHtml?

This could certainly be a decent way of doing things, but I can’t find a viable alternative to Html.fromHtml. Plus, even if I were able to, the Android TextView just isn’t really designed for super long articles loaded from the internet with complex styling, as I have now realized.

Is this the end of Violoncello?

No. I am not giving up on it now. However, I’m also not accepting mediocre performance. Fortunately, there’s a faster and better alternative to using a TextView, and it’s quite obvious now that I think about it! Why not just use a WebView?

Speed improvements

At the time I’m writing this, I haven’t actually written any code to test this, but I’m certain there will be speed improvements with the switch to a WebView. I can keep the code that removes non-text elements from the HTML, and simply have the WebView load it like a normal page. No converting HTML to a Spannable would be required, which was the main thing slowing loading pages down. Plus, with a little CSS magic, I should hopefully be able to keep features like custom fonts and colors. It’s a really good alternative, but there is one major downside to it that I know of at the moment.

The bad news

Implementing this is going to require a lot of rewriting of code. I am okay with this, as I really want this app to turn out well. However, this will likely result in the app’s release being somewhat delayed. I’m very sorry about this, and I look forward to moving on myself. However, I can’t in good conscience release a slow, unoptimized app when a better alternative clearly exists.

Ending on a high note

On the bright side, I have a feeling Violoncello will turn out really well when it is eventually released. Again, I’m really sorry for the delay, but I hope you understand why I feel it necessary to make these improvements. Thanks for reading, and expect to see more updates soon.

Popular posts from this blog

Late 2014 Mac mini in 2021 - How does it hold up?

Nearly two months ago, I finally got my first Mac: a late 2014 Mac mini. While I usually don't review stuff on this blog, I thought I would make an exception for this device. My hope is that this review will be helpful and fairly unbiased while helping you make a decision on whether or not to get one of these Macs. So, how does this miniature Macintosh hold up today? Design The Mac mini's design has remained largely unchanged over the last decade. There have been a few small updates and tweaks to it, but nothing particularly major. This means that the 2014 Mac mini features the usual premium and minimal aluminum casing with a white status LED on the front. Overall, I'd say this Mac mini's design has held up pretty well! It's very small, being only 8 inches wide and long, while only having a height of 1.4 inches. It weighs a little over 2.5 pounds, so it's not too heavy, either. These dimensions make for a very nice and compact computer, and I think it fits in wi

I made a custom iPod. Should you?

I made a custom iPod. Should you? The goal of this post is to share my experience modding this retro audio player and help you decide if you should attempt this project, too. While this isn't the sort of thing I usually write about on this blog, my hope is that this post will be helpful to those interested in building a custom iPod. So, without further ado, let's begin! The Backstory With the rise of DankPods , modding iPods has quickly become quite popular among retro tech enthusiasts. As someone who had been using iPods for several years prior to their resurgence in popularity, I was intrigued by the idea of making my own custom iPod. This was especially true since I had a broken iPod Video that I could easily mod. Then, something completely unexpected happened: the pandemic. I quickly realized that this would be a great project to work on during the lockdown. As a result, within days of everything shutting down, I had ordered all my replacement parts and prepared

3 years, 2 iOS apps, and a new site

In March of 2018, I wrote my first Tectra program. It was a basic web browser called Satin Web, and it was the first thing I made with C# and Windows Forms. It is now March 2021, three years later, and I am very excited to announce that the next chapter for Tectra is here. After hours of work, I have finally completed my first two iOS apps and have created a new site from scratch to go along with them. There is a lot to cover, so let's begin! iOS Apps TaskNudge TaskNudge is the first of my two iOS apps. It's pretty simple but very handy! Essentially, it lets you write a single, short-term task and get notified to complete it every 1-60 minutes, depending on what you choose. If you are easily distracted when you use your devices, have trouble remembering to do things, or need a bit of a nudge to get something done, TaskNudge might just be the app for you! Best of all, TaskNudge is very simple and easy to use, while being more useful than something like a timer or alarm. Once you