简体   繁体   English

获取所有NodieId或所有NodeAliasPaths API 7的最佳方法是什么

[英]What's best way to get all NodieIds or all NodeAliasPaths API 7

I collected NodeIds (22,000 of them) to List and passed them to 我将NodeIds(其中22,000个)收集到List中并将其传递给

tree.SelectSingleNode(NodeID) // Kentico API7

Whether I use 我是否使用

tree.SelectSingleNode(NodeID) 

or its equivalent for NodeAliasPath 或等效的NodeAliasPath

tree.SelectSingleNode(CMSContext.CurrentSiteName, aliaspath, culture) 

with both returning a node that allows manipulation of Node data, I get a out of memory error on either line: 都返回一个允许操作Node数据的节点,我在任一行上都遇到内存不足错误:

tree.SelectSingleNode(NodeID) 

tree.SelectSingleNode(CMSContext.CurrentSiteName, aliaspath, culture)

Is the error message due to the code or the environment? 错误消息是由于代码还是环境造成的?

Here's the error message: 这是错误消息:

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\\Users\\xxxxxxx\\Documents\\Visual Studio 2013\\Projects\\ConsoleApplication4\\ConsoleApplication4\\bin\\Debug\\ConsoleApplication4.vshost.exe'. 托管调试助手“ FatalExecutionEngineError”已在“ C:\\ Users \\ xxxxxxx \\ Documents \\ Visual Studio 2013 \\ Projects \\ ConsoleApplication4 \\ ConsoleApplication4 \\ bin \\ Debug \\ ConsoleApplication4.vshost.exe”中检测到问题。

Additional information: The runtime has encountered a fatal error. 附加信息:运行时遇到致命错误。 The address of the error was at 0x005228e7, on thread 0x5330. 错误的地址位于线程0x5330上的0x005228e7。 The error code is 0x80131623. 错误代码为0x80131623。 This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. 此错误可能是CLR或用户代码中不安全或不可验证部分的错误。 Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. 该错误的常见来源包括COM-interop或PInvoke的用户封送处理错误,这些错误可能会破坏堆栈。

It appears you're getting the information correctly. 看来您正在正确获取信息。 Problem is you simply have too many nodes and run out of memory when storing all that data in memory. 问题是,当您将所有数据存储在内存中时,您只是拥有太多的节点而导致内存不足。 What I'd do is get the data and process it in batches. 我要做的是获取数据并分批处理。 If you're running a multi-tenancy environment, you might also specify a SiteID in your where clause. 如果您正在运行多租户环境,则还可以在where子句中指定SiteID。 You can also specify the columns you want to receive back or modify and this will also help with the amount data you're bringing back. 您还可以指定要接收或修改的列,这也将有助于您带回的数据量。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在文件的两个带标签的行之间获取所有内容以便可以反序列化的最佳方法是什么? - What's the best way to get all the content in between two tagged lines of a file so that you can deserialize it? .NET - 实现“捕获所有异常处理程序”的最佳方法是什么 - .NET - What's the best way to implement a “catch all exceptions handler” 在对象列表中打印所有属性的最佳方法是什么? - What's the best way to print all properties in a list of objects? 使用 Smartsheet API 从每张工作表中的任何行获取所有附件的最有效方法是什么? - What's the most efficient way to get all attachments from any row in every sheet using Smartsheet API? 获取枚举标志所有位的最佳方法是什么? - Best way to get all bits of an enum flag? 快速获取所有匹配项的最佳方法 - Best way to get all items that match quickly 除了一个(登录)之外,保护Controller中所有操作的最佳方法是什么? - What's the best way to protect all actions from a Controller except one (Login)? 使多个线程同时工作并等待所有线程完成的最佳方法是什么? - What's the best way to have multiple threads doing work, and waiting for all of them to complete? 邮包。 将现有文件夹及其所有子文件夹和消息移动到另一个文件夹的最佳方法是什么? - Mailkit. What is the best way to move an existing folder with all it's subfolders and messages to another? 编译子对象列表中所有父对象列表的最佳方法是什么? - What's the best way to compile a list of all Parent objects of a list of child objects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM