FileStream writeBytes/writeBase64 Performance Issues

Original Created Jun 08, 2018 | Regeneration Apr 22, 2026

When writing binary data to a file using writeBytes or writeBase64 methods, the performance is extremely slow (approximately 100 kB/s with 100% CPU usage) on a Tizen 3.0 mobile emulator running on a slow host machine.

Is there a specific reason for this performance issue? Are there alternative methods for writing binary data to files that would be faster?

Problem Understanding

The user is experiencing slow performance when writing binary data using FileStream's writeBytes or writeBase64 methods on a Tizen 3.0 emulator. The issue manifests as:

  • Slow write speeds (~100 kB/s)
  • High CPU utilization (100%)
  • Occurs specifically in emulator environment

Solution Methods

  1. Test on Real Device First

    • Emulator performance can be significantly different from actual hardware
    • Performance characteristics may vary based on host machine specifications
    • Recommended to verify the behavior on a physical Tizen device
  2. Alternative Binary Writing Methods

    • Consider using lower-level file I/O operations if available
    • For large binary data, chunking the writes might improve performance
    • Explore using BufferedStream for potentially better performance
  3. Performance Optimization

    • Check if there are any unnecessary conversions happening in the data pipeline
    • Verify if the file system being used has any known performance characteristics
    • Consider asynchronous writing if the application architecture allows

Additional Tips

  • When testing performance, ensure you're using release builds rather than debug builds
  • Monitor memory usage during file operations as memory pressure can affect performance
  • For large file operations, consider implementing progress feedback to the user

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.