Skip to content

SQLite Performance Degradation After Migrating from Xamarin to .NET for Mobile Apps #1277

@sheetalsharma24

Description

@sheetalsharma24

Hi Team,

We previously developed our applications using Xamarin.Android and Xamarin.iOS. Following Microsoft's end of support for Xamarin in 2024, we've migrated our project to .NET for mobile apps.

In our Xamarin implementation, we used the SQLite.NET-PCL NuGet package for database operations. As this package is now deprecated, we've transitioned to the recommended sqlite-net-pcl package in the new .NET mobile environment.

However, we're facing a significant performance issue post-migration. A critical process in our app inserts over 10,000 rows into the SQLite database within a loop. While this operation took approximately 3 minutes in the Xamarin version, it now takes almost 6 minutes in the .NET version, despite the code and logic remaining largely unchanged.

We've already implemented several performance strategies:

Enabled Write-Ahead Logging (WAL)

Wrapped inserts in a single transaction

Optimized queries and indexing

Enabled AOT compilation

Despite these efforts, performance remains noticeably degraded.

Could you please advise if there are any known issues, changes in runtime behavior, or recommended optimizations for improving SQLite performance in .NET for mobile apps?

Best Regards
Sheetal Sharma

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions