Timeline for Moving files according to paths in database
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 5, 2021 at 15:13 | comment | added | MickeyMan | @iSR5 will try and feedback. | |
Nov 5, 2021 at 7:53 | comment | added | iSR5 |
@MickeyMan you can add more performance by calling the FileMove in kernel32.dll which what File.Move does internally. doing this would bypass all validations, and you will need to handle it, here is snippet codepile.net/pile/Ywpz0JjA
|
|
Nov 4, 2021 at 14:50 | comment | added | jdt | @MickeyMan - I think you will need to do something like the following: 1. Set database into single-user mode. 2. Disable the trigger, 3. Iterate through all the records. 4. Move the files and keep track of the changes in some sort of collection. 5. Bulk insert changes into the log. 6. Re-enable the trigger. 7. Set database into multiuser mode. | |
Nov 4, 2021 at 14:31 | comment | added | MickeyMan | @upkajdt well I want to log what images been moved. | |
Nov 4, 2021 at 14:05 | comment | added | jdt |
@MickeyMan, Sorry but I have no idea what is happening in your serilog . Can you perhaps disable it while moving the files?
|
|
Nov 4, 2021 at 14:01 | comment | added | MickeyMan | @upkajdt it's super fast now but I can't trigger the log method (serilog) as it keep keeps creating log file and deleting it I think I can't trigger the method with in Parallel.ForEach | |
Nov 4, 2021 at 13:56 | comment | added | MickeyMan | Peter thanks....my bad XD | |
Nov 4, 2021 at 13:27 | comment | added | jdt | @MickeyMan, I think you should have thanked Peter ;-) I have to say that I'm surprised that it made a difference. | |
Nov 4, 2021 at 9:51 | comment | added | MickeyMan | @upkajdt Thank you a lot! It works Parallel.ForEach big increase in performance it takes 250mb from memory but file moving way faster, I have another issue now with serilog as it create a log file for each thread if you a way to solve let me know thanks again. | |
Nov 4, 2021 at 9:38 | vote | accept | MickeyMan | ||
Nov 3, 2021 at 9:38 | comment | added | jdt | @MickeyMan, I will like to see your feedback. I suspect that vectoring the move operations will most likely be slower, especially on a clunky old and fragmented HDD, but I have often been wrong :-) | |
Nov 3, 2021 at 9:10 | comment | added | MickeyMan | Thanks, will try it and feed back. | |
Nov 3, 2021 at 8:57 | history | answered | Peter Csala | CC BY-SA 4.0 |