[dba-VB] Why are my data Context Objects soooo sloooow

Mark Breen marklbreen at gmail.com
Wed Dec 2 07:39:14 CST 2009


Hello Shamil,

Thank you for your detailed response.

*Browsers*
Some comments, I am actually using Chrome to View my work, but I am not
doing any debugging, in the traditional sense, I code a few lines, click
save and then view the results in Chrome, when I am not happy, I flick back
to VS, change it and continue again.  So, it is true to say, I am not really
debugging, just viewing.  However, I stopped using IE a few years ago, and
since I switched to Chrome, it is the first thing I install on new machines.
 With the exception of the MSDN site, it works perfect for me.


*Slow Data Contexts*
So can I assume that this slowness is simply to be accepted, it is either a)
the way VS2008 usually performs, or b) the way VS2008 performs when data
contexts are involved in a large project such as DNN.  I did not notice any
difference when I copied the code from the wwwroot folder, so I hope that is
not part of the problem.

*DNN Development*
Probably I am not doing real DNN custom programming, but I am currently
building web user controls, and simply saving them, and then creating a
module for DNN and including the web user control on that module.  I know
this is not real DNN programming, but have created about 20 module so far
like this.  DNN gives me, as a script kiddie type programmer, they ability
to do a simple web app, but it manages the users and authentication,
something that I could never program.

IOW, with the exception of a few DNN hooks, I am doing simple programming,
but throwing the results into DNN.


*Free Lunch*
I have to say I agree with you, there are limitations everywhere.  My
appoach is always to keep it as simple as possible until I absolutely know
that I need to make it more complex.



Thanks,

Mark

2009/12/2 Shamil Salakhetdinov <shamil at smsconsulting.spb.ru>

> Hello Mark --
>
> First of all try to switch to FireFox - forget IE while debugging large
> ASP.NET apps from within VS....
>
> I  can only note that debugging large ASP.NET applications is a real PITA
> -
> this is why I'm always trying to get out as much as possible BL and DAL
> code
> into separate projects and develop, debug/test them without UI (ASP.NET or
> WinForms or WCF)...
>
> And DNN is a "huge ASP.NET" app with a lot of classlibs, which are so
> tightly coupled together that there is no way to debug part of them outside
> of running DNN instance - with all the consequences - bad luck...
>
> I suppose you can edit DNN's Data Context Objects source code from AppCode
> outside of VS (e.g. within notepad) - when the edits are saved then DNN
> will
> restart, that could take a while, quite a while....
>
> A temp solution could be to keep *all* the source code of DNN module's
> control within that control's code behind .aspx.cs (.aspx.vb) during
> development - when you edit your code there then ASP.NET app will not
> restart it will just recompile .aspx and .aspx.cs - so it should work
> considerably quicker...
>
> All in all I think DNN custom modules development is a RPITA - one can
> never
> know how much it will finally take for a given project if they will not try
> to find a way to debug/ test as much as possible code outside of running
> DNN: something like develop a separate ASP.NET application, make it
> working
> and then port it to DNN environmnet...
>
> Be prepared for "crazy debug sessions" (if I'm  not missing something and
> there are some "miracle" tools, which simplify DNN custom development
> debugging)...
>
> Philosophic note: DNN seems to be a good example that there "are no
> miracles
> in this world" - DNN is a great prototyping tool and CMS, when one has
> ready
> to use DNN modules and skins, and DNN is becoming RPITA when one have to
> develop a(n) (advanced) custom module. Rhetoric Question: Why in this world
> there couldn't be a "silver-bullet" tool able to support both standard and
> custom development with the same ease as DNN does support CMS development?
>
> I guess "Ruby on Rails" could be "what doctor ordered"?...
>
> Or ASP.NET MVC2 Framework?
>
> DNN did grow from a "junky" MS ASP.NET sample code base, and even advanced
> developers as DNN Core Development Team members are can't still "convert"
> that original "junk" to pearls...
>
> Hopefully they will do that in DNN v.7? - they "just" need to clean-up DNN
> huge code base and to implement what is called "Inversion of Control"
> (http://martinfowler.com/articles/injection.html) to "untight" DNN Core
> classlibs as much as possible...
>
> Please correct me if I'm wrong - in fact I'd be really happy to be wrong
> here as I have had to suspend one of the DNN projects, which didn't go
> smoothly because of PITA DNN custom modules development experience...
>
> Sorry, Mark, I have no a definitive answer for you here - just some "soap"
> and "bubbles" and PITA of my own DNN custom modules development experience,
> which I need to find a way to workaround, or quit the idea of DNN custom
> development completely as it's too expensive to be true. Still hope I
> missed
> some approaches to simplify this development - I mean ready to use
> approaches and tools without long learning curve...
>
> Thank you.
>
> --
> Shamil
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen
> Sent: Wednesday, December 02, 2009 1:23 PM
> To: Discussion concerning Visual Basic and related programming issues.
> Subject: [dba-VB] Why are my data Context Objects soooo sloooow
>
> Hello All,
>
> I am running VS 2008 on a powerful machine with loads of resources.  My
> project is a DNN project sitting in the wwwroot folder which allows me to
> change a few lines of code and then immediately see the results in the web
> app.
>
> However, when I manipulate the Data Context Objects in the AppCode Folder,
> the response times are dreadfully, slow.  It takes three to four minutes to
> open, edit, save and close one of these objects.
>
> I have tried it on a second machine and the results are similar.
>
> I can edit the Dbml files outside of the solution, but I am not sure
> whether
> that is safe to do so, when I edit them outside the solution (copying and
> pasting to another folder and then opening the dbml file from there), they
> open instantly.  When I say "safe to do so", does the project file or the
> sln file need to be updated with the changes that have been made.  I do get
> some warning message about "cannot find web.config, so using the file from
> the dbml file instead" which I accepted.
>
> I recall Shamil mentioned that manually editing these within the individual
> files is not a good idea, so i guess that he may have been suffering the
> same problems as I am, IE so sloooow to open and close.
>
> TIA for an help, if I have not expressed the problem clearly enough, let me
> know,
>
> Mark
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 4654 (20091202) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.esetnod32.ru
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 4654 (20091202) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.esetnod32.ru
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>



More information about the dba-VB mailing list