vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   CODERS PLEASE DISCUSS!!! Pre-Datastore modifications with XML-files (UPDATE 28-7) (https://vborg.vbsupport.ru/showthread.php?t=93007)

Marco van Herwaarden 07-27-2005 04:20 PM

Quote:

Originally Posted by KirbyDE
Wouldn't that require way more memory/database bandwidth?

Not really, bandwidth is not really an issue, since it is just a server process, and the datastore table will never have hundreds of records.

Edit: Memory used to keep the datastore in memory for later processing by scripts is more an issue then the memory used while retrieving everything.

I will try to make some alternatives tomorrow.

Andreas 07-27-2005 04:22 PM

What I meat was a serialized array with the Requirements for each Product.
This item should always be queried then, the Load Routine should extract the currently needed Data (identified by scriptid/area) and merge it with the existing $globaltemplates, $actiontemplates, $phrasegroups and continue execution - just like it does with the XML Files idea.

Marco van Herwaarden 07-27-2005 04:28 PM

I will have a sleep over this all, not sure yet that what you are suggesting could be done with less performance issues then the solution i posted above, but maybe we should write out all possible solutions and find some big boards who want to be testing it and marking execution times. On my localost, the above solution (including the query) added 0.01 second to the page load.

PS I made a reply at your thread on vb.com, asking others to join us here in the discussion.

Andreas 07-27-2005 04:32 PM

I am not sure either :)
But in Theory a Query (if it's not heavy) should be faster then File Operations and Parsing.

Link14716 07-27-2005 04:46 PM

I say it should load all the entries from the XML files regaurdless of whether the product is enabled or not to save the query.

I say Kirby's original idea at vB.com sounds good with a few tweaks for datastore stuff.

Marco van Herwaarden 07-27-2005 06:58 PM

I will also have a go at implementing that idea tomorrow, unless someone else volunteers. In the end i hope that we come together with the best solution and try to persuade Jelosoft in integrating it, or we could use it here for all coders who want to use it.

tamarian 07-27-2005 07:01 PM

Great idea, here are some comments

1. We really should find something to eliminate the need for an extra query and an xml parse for each page view. Large sites cannot afford this. Of course smaller sites can use this, but hack authors would still require filed edits, so their hacks don't slow down large sites.

2. Since there are file edits anyway, why not edit global.php instead. I think some re-arrangement can help, such as moving init_language to below a hook (can't see any side effects, but I could be wrong). This, I assume will solve the phrasegroup issue?

3. What's left are templates. But since we can already modify global templates with a plugin, and if it uses an if statement to check for the script being used before merging the hack's template, then we're done (except for special templates)

But, let's hope vB Dev's surprise us before gold, and we don't have to mock things up :) I noticed Scott's reply to Kirbey's thread, so I am optimistic.

Marco van Herwaarden 07-27-2005 07:21 PM

Thanks for the input tamarian, will have a good sleep over this and try to find some alternatives tomorrow.

Didn't notice the reply at vb.com yet, but will go have a look.

To all other coders........input please.

Chris M 07-27-2005 08:31 PM

It sounds like a great addition, but I would like to see what the Dev's take on this :)

Satan

merk 07-27-2005 10:26 PM

I thought if you had another table all that would be required is to modify the datastore query that is already present to join another table with more conditions for extra things to pull

ie

[sql]
SELECT *
FROM datastore
JOIN NEW TABLE
WHERE title IN(blah) OR
NEW TABLE CONDITIONS (IF title=title and newtable.active)[/sql]


All times are GMT. The time now is 10:07 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05025 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete