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 2022 - Still Worth Buying?

About a year ago, I reviewed the 2014 Mac mini on this blog. Ultimately, I came to the conclusion that it was still an excellent machine for productivity tasks, but it could also handle some more intense things you threw at it. Thus, it became my daily driver up until I upgraded to a 2017 MacBook Air a few months ago. That being said, I’ve still been using it some, so I thought I’d briefly share how it’s holding up these days. Here are my thoughts on this miniature Macintosh one year later! Performance  Over the last year, I’ve been impressed by how much this Mac can handle. It’s rocking a 2.6 GHz dual-core Core i5 with 8 GB of RAM and a Samsung 860 Evo 1 TB SATA SSD. What all that jargon essentially means is that it’s a moderately powerful little computer, although it certainly isn’t going to put newer Macs to shame. Regardless, I’ve been able to do lots of coding, video editing, and schoolwork on this computer, and it has generally worked pretty well. Granted, it can take a while...

I love my Instax Mini SE. Here's why!

Hey, folks! I did it. I finally got into instant photography. And I love it. Admittedly, I've had some experience with instant photography before now. I got my first instant camera at a thrift store in 2022. It was a Polaroid OneStep from the 90s, and while film was still readily available for it, it was far too expensive to justify using it regularly. As cool as instant photography was, I accepted that it wasn't economically viable for me and moved on. ...Until about a month ago! On one of my first dates with my girlfriend, she introduced me to her Fujifilm Instax Mini 11. It was a much more compact and modern instant camera than my Polaroid. It also used smaller film slides. This was a big deal, as she informed me that the smaller film came at a smaller price. I was intrigued. A couple weeks later, I ventured to Walmart and splurged. I picked up the cheapest Instax they sold: The Mini SE. It only cost about $57, and it came bundled with 10 slides of film. I also picked up an ...

Violoncello for Windows is finally here!

Hi, everyone! Ever since I first started working on it over a month ago, I have spent countless hours creating and perfecting Violoncello for Windows. Featuring a slick and minimal UI, lots of customization options, and support for Windows versions going all the way back to XP, I am very pleased with how the Windows version of Violoncello has turned out. As a result, I am very excited to announce that Violoncello for Windows has finally been released! Violoncello for Windows is packed with features, some of which are found in the mobile version, and others that are not. Some of these include: Open in main browser: Easily open the page you are currently viewing in Violoncello in your default browser! Custom search engine: Choose from Bing, Google, DuckDuckGo, Wikipedia, or set your own. Lots of customization: Change the background and text colors, and choose a font. Bookmarks: Easily manage and visit bookmarks. Jump to top: Quickly jump to the top of a page. (0, 0) Those are most of the...