Hi to all!

As you may know, my name is Nazar Gerasymchuk and I’m working on refactoring
of library concurrency. All of my work is related with access to database
and I’m trying to optimize it. You can see Blueprint connected to this theme 
on Launchpad <https://blueprints.launchpad.net/mixxx/+spec/nonblockingdb>  .
Here you can find information on  my project wiki-page
<http://www.mixxx.org/wiki/doku.php/nonblockingdb_status>  .

I want to consult with others about my further work.

We got one long-time operation -- library scanning.  I’ll try to implement
this scheme instead of one big transaction:

- emit (start()); 
- Inform user about long-time operation.
- Block UI-control element (to avoid querying equivalent queries).
- Get id for this big operation from DBAccessor
- Cycle
- - Prepare chunk of data DATA (do some FS-access/calculations/...)
- - Mark DATA by id.
- - Wrap DATA into one transaction.
- - Async send chunk of data to DBAccessor.
- Wait until DBAccessor say that big operation with id ended.
- Unblock UI-control element.
- emit (end());

This can give us possibility to divide all work into several pieces, do some
work, collect data in transactions and then one by one send it to DB. (But
not lock DB while doing one big transaction). Reading seems to work during
active transaction.

Next I’ll work on is preparing test-cases:
- For SQLite (see https://github.com/troyane/SQLiteTesting)
- Create library of files for library scanner

Thank for advice!



--
View this message in context: 
http://mixxx-devel-list.2283481.n4.nabble.com/Library-scanner-refactoring-tp4641801.html
Sent from the Mixxx Devel List mailing list archive at Nabble.com.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to