Register   Login
     
  Latest Posts  
RE: My customizations to EditAlbum.ascx.vb... threaded sync, memory leak fix, other bug fixes
by markjjordan on 11/20/2008 4:58 PM
multi language site
by Tiram on 11/20/2008 4:43 PM
Download Module
by MarkSensei on 11/20/2008 4:05 PM
RE: Remove Kick it! | DZone it! | del.icio.us, etc
by burnt on 11/20/2008 3:46 PM
RE: Remove Kick it! | DZone it! | del.icio.us, etc
by jcochran on 11/20/2008 3:42 PM
RE: Reproducible Bug
by jcochran on 11/20/2008 3:39 PM
RE: File Links in feeds
by jhoelz on 11/20/2008 3:30 PM
File Links in feeds
by jhoelz on 11/20/2008 3:15 PM
RE: Select Files button not working
by bmlynn on 11/20/2008 2:54 PM
RE: Select Files button not working
by jhughes on 11/20/2008 2:36 PM
  Forums  
Subject: My customizations to EditAlbum.ascx.vb... threaded sync, memory leak fix, other bug fixes
Prev Next
You are not authorized to post a reply.

Author Messages
Mark J. JordanUser is Offline
Gold Membership
Nuke Newbie
Nuke Newbie
Posts:8

11/02/2008 12:33 PM  

 

My goal with using this module was to maintain the folders of photos via FTP (or Windows Explorer if I was remotely logged into the machine), and then run the Resync feature to resynchronize the DB to what is on the hard drive. Some of my challenges were:

 

  • Memory leak when resyncing with the "resize images" checkbox unchecked.
  • Deleting of an album from the file system, and then resyncing, did not delete the child albums from the DB.
  • Repeated resyncing was causing subalbums to be readded to its parent album; hence, the album kept getting duplicated in the DB.
  • When resyncing a huge album with many subalbums and photos, the postback to the server would timeout, causing the sync to stop without finishing.

 

I have made some modifications to the EditAlbum.ascx.vb file to overcome these challenges, and redeployed my DLL's. In the interest of community, I have attached my new version of EditAlbum.ascx.vb which inherits from version 2.3.18 (current version as of this writing).  You will notice lines that have the following that help delineate where my modifications are located:

 

  • Mjj.so -- start omission.
  • Mjj.eo -- end ommssion
  • Mjj.sn -- start new
  • Mjj.en -- end new

 

Here's a summary of what I've modified:

 

  • Bug fixes
    • Disposal of System.Drawing.Image now performed when synchronizing album and "resize images" checkbox not checked. Was causing a memory leak before the fix.
    • Deletion of an album will now successfully delete children subalbums from the DB.
    • When synchronizing, subalbums now not getting added to the parent album more than once.
    • When a folder (ie. album or subalbum) is deleted on the file system, and then a synchronization is run, the album/subalbum and child subalbums and photos will be removed from the DB.
  • Enhancements
    • Synchronization of album and subalbums now done in background process. When the "Synchronize Folder" link is clicked, a message is immediately displayed to the user as "Background synchronization process submitted." When the background synchronization is completed, an email is sent to the user that submitted the process, and an entry is logged into the DotNetNuke Admin Event Viewer. Submission of another synchronization process while another is still running will queue until prior ones are completed. While the process is running in the background, the user can still perform other functions on the site.
  • Stil wanting to do:
    • Enhance synchronization so that any photo and album descriptions are not lost. Maybe add a checkbox that will either do a full resync from scratch if checked (ie. all descriptions and other meta data lost), or an incremental/relative sync (where db record for album or photo is only recreated if necessary). This would be better for adding a subalbum via FTP and resyncing the full parent album.

 

Scott... feel free to include in future releases of SimpleGallery. :) 


Attachment: EditAlbum.ascx.vb.zip

Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12441


11/02/2008 1:34 PM  
Awesome, I'll take a look and integrate it in the DNN 5 build.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12441


11/18/2008 4:07 AM  
Thanks Mark - I've extended your membership for a year (for this contribution)

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12441


11/18/2008 6:21 AM  
I've put these changes in the latest module.

Scott McCulloch
Site Administrator
Mark J. JordanUser is Offline
Gold Membership
Nuke Newbie
Nuke Newbie
Posts:8

11/20/2008 8:58 AM  

Thanks so much for the membership extension... very generous of you.

I'll be posting an update to the code soon, to fix a couple of issues that I found. I have to get my environment reset, though... a windows update hosed something, so I have to restage my machine.

Thanks for your efforts on this and other modules. I can finally get my family's gallery up for vieiwing by my extended, remote family members. :)

Mark

 

You are not authorized to post a reply.
Forums > Modules > Simple Gallery > My customizations to EditAlbum.ascx.vb... threaded sync, memory leak fix, other bug fixes



ActiveForums 3.7